Widget size measurement

SuperDeck does not expose a public widget-size measurement API.

Widget size measurement

SuperDeck does not export a public MeasureSize widget from package:superdeck/superdeck.dart.

If you need rendered size information in your app code, use Flutter’s built-in layout and measurement tools instead of relying on SuperDeck internals.

Prefer built-in layout tools

Choose the tool that matches the problem:

  • LayoutBuilder (constraints during build)
  • SizeChangedLayoutNotifier (change notifications)
  • CompositedTransformTarget + CompositedTransformFollower (anchored overlays)
  • AnimatedSize (animate size changes)
  • CustomSingleChildLayout / CustomMultiChildLayout (custom layout)

Example with LayoutBuilder:

import 'package:flutter/widgets.dart';

class ResizablePanel extends StatelessWidget {
  const ResizablePanel({super.key});

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
      builder: (context, constraints) {
        return Text('constraints=$constraints');
      },
    );
  }
}