Size/dynamic_size library
A library for dynamic sizing and navigation in Flutter.
The dynamicutils library provides utilities for dynamically sizing widgets based on the device's screen dimensions.
It also includes navigation functions for managing screen transitions.
Usage:
- Import the
dynamicutilslibrary. - Create an instance of the
DynamicSizeclass by providing the initial height and width values. - Use the
heightandwidthmethods to dynamically calculate the desired height and width based on the provided values. - Use the
HeightSpaceandWidthSpacemethods to createSizedBoxwidgets with dynamic heights and widths. - Use the
dContainermethod to create aContainerwidget with dynamic dimensions and other customizable properties. - Use the
Pop,NewScreen, andReplaceScreenfunctions for navigation purposes.
Note: This library requires the flutter and material packages.
Classes
- DynamicSize
- A class for dynamically sizing widgets based on screen dimensions.
Functions
-
newScreen(
BuildContext context, dynamic screen()) → void - Navigates to a new screen.
-
pop(
BuildContext context) → void - Navigates back to the previous screen.
-
replaceScreen(
BuildContext context, dynamic screen()) → void - Replaces the current screen with a new screen.