binding_helper 0.0.2
binding_helper: ^0.0.2

Flutter Android iOS web

A easy way to use WidgetsBinding

binding_helper #

Helper for WidgetsBinding.It is a easy way to use WidgetsBinding, for example: Get the size of a widget after the widget is rendered.

Getting Started #

Install #

add

    binding_helper:

to your pubspec.yaml

Get the size of the widget #

Using GetRectMinxin


class MyState extends State<MyWidget> width GetRectMinxin<MyWidget>{

    // The rect includs size and position of the widget
    @override
    void onGetRect(Rect rect) {
        ...you code
    }

}

Using RectProvider


 new RectProvider(child: myWidget,onGetRect: (Rect rect){
            /// rect is the `Rect` of myWidet
          _rect = rect;

},)

More easy way to use WidgetsBinding is coming soon. #

0
likes
90
pub points
26%
popularity

A easy way to use WidgetsBinding

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jzoom8112@gmail.com

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on binding_helper