Giter Site home page Giter Site logo

lam-nv / measured-size Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ayham95/measured-size

0.0 0.0 0.0 14.68 MB

A flutter widget that calculates the size of it's child in runtime.

License: MIT License

Objective-C 0.55% Kotlin 1.77% Dart 69.91% Swift 5.87% HTML 21.89%

measured-size's Introduction

measured_size

A flutter widget that calculates the size of it's child in runtime.

Getting Started

MeasuredSize Calculated the size of it's child in runtime. All you have to do is to wrap your widget with MeasuredSize and listen to size changes.

Usage

Complete example

MeasuredSize(
              onChange: (Size size) {
                setState(() {
                  print(size);
                });
              },
              child: Text(
                '$_counter',
                style: Theme.of(context).textTheme.headline4,
              ),
            );

onChange will be called when the [Size] changes.

onChange will return the value ONLY once if it didn't change, and it will NOT return a value if it's equals to Size.zero

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.