Search packages, repositories and app categories

GitHub repositoryjavaherisaber/widget_size

widget_size

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

widget_size project cover
Stars
6
Forks
0
Last push (UTC)
Oct 9, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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,
  ),
)
Mahdi Javaheri GitHub avatar
GitHub author

Mahdi Javaheri ↗

Software Engineer

Yerevan, Armenia
LanguagesDartHTMLSwiftKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^1.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗