widget_size 1.0.0 copy "widget_size: ^1.0.0" to clipboard
widget_size: ^1.0.0 copied to clipboard

A widget to calculate it's size after being built and attached to a widget tree

widget_size #

pub package

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

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,
  ),
)
30
likes
140
pub points
87%
popularity

Publisher

verified publisherbuildtoapp.com

A widget to calculate it's size after being built and attached to a widget tree

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on widget_size