0 purchases
widget size
widget_size #
A widget to calculate it's size after being built and attached to a widget tree
Usage #
To use this plugin, add widget_size as a dependency in your pubspec.yaml file.
dependencies:
widget_size: ^lastVersion
copied to clipboard
Example #
double _yourHeight = 50;
double _yourWidth = 50;
WidgetSize(
onChange: (Size size) {
// your Widget size available here
_yourHeight = size.height;
_yourWidth = size.width;
},
child: Container(
height: _yourHeight,
width: _yourWidth,
color: Theme.of(context).primaryColor,
),
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.