rect_getter 1.1.0 icon indicating copy to clipboard operation
rect_getter: ^1.1.0 copied to clipboard

A widget provide a simple way to get child`s rectangle information after rendered.

rect_getter #

A widget provide a simple way to get child's rectangle information after rendered.

Usage #

To use this plugin, add rect_getter as a dependency in your pubspec.yaml file.

Example #

// Import package
import 'package:rect_getter/rect_getter.dart';

// Instantiate it

var globalKey = RectGetter.createGlobalKey();
var rectGetter = RectGetter(
    key: globalKey,
    child: _child,
);

or

var rectGetter = RectGetter.defaultKey(
    child: _child,
);


// and add it to your layout .

// then you can get rect by

Rect rect = rectGetter.getRect();

or

Rect rect = RectGetter.getRectFromKey(globalKey);


Read More : 利用RectGetter组件获取控件位置尺寸实现的几个高级效果和功能 #

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

64
likes
130
pub points
95%
popularity

Publisher

verified publisher icondebuggerx.com

A widget provide a simple way to get child`s rectangle information after rendered.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on rect_getter