netglade_flutter_utils library
NetGlade Flutter utils library used internally at netglade.
Classes
- Conditional
-
Based on condition builds either whenTrue on true or whenFalse on false.
If no whenFalse is specified,
SizedBox.shrink()
is used. - ConditionalChild
-
Based on condition builds either whenTrue on true or whenFalse on false and wraps child widget.
If no whenFalse is specified,
SizedBox.shrink()
is used. -
ConditionalNull<
T> -
Build either whenNotNull or whenNull based on value nullability.
If no whenNull is specified,
Container()
is used. - ConditionalWrap
- Wraps child child in wrapper widget only if condition is true.
Extensions
Functions
-
useOnPageIsVisible(
{required RouteObserver< Route> observer, required OnPageVisibleCallback onPageVisible}) → void -
Callback
onPageVisible
called when current PageRoute is visible again. -
useRouteAware(
{required RouteObserver< Route> observer, VoidCallback? onDidPopNext, VoidCallback? onDidPush, VoidCallback? onDidPop, VoidCallback? onDidPushNext, List<Object?> keys = const []}) → void
Typedefs
- OnPageVisibleCallback = void Function({bool pushedIn})
-
WidgetBuilderWithValue<
T> = Widget Function(BuildContext context, T value) - WidgetWithChildBuilder = Widget Function(BuildContext context, Widget child)
- WrapperBuilder = Widget Function(BuildContext context, Widget child)