aloisdeniel / measurer

A widget that measure the size of its child.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

measurer

A widget that measure the size of its child.

Quickstart

@override
Widget build(BuildContext context) {
    return Measurer(
        onMeasure: (size,constraints) {
            print('Child new size: $size');
        },
        child: Child(),
    );
}

Usage

onMeasure

A callback to that is called each time the layout size of the child changes.

onPaintBoundsChanged

A callback to that is called each time the painting bound size (an absolute rectangle that contains all the pixels painted by the child) of the child changes.

About

A widget that measure the size of its child.

License:MIT License


Languages

Language:Dart 100.0%