ContextExtensions extension
Extensions for BuildContext to simplify common UI and navigation tasks.
- on
Properties
- colorScheme → ColorScheme
-
Available on BuildContext, provided by the ContextExtensions extension
Access the current ColorScheme quicklyno setter - height → double
-
Available on BuildContext, provided by the ContextExtensions extension
Access current screen heightno setter - isDarkMode → bool
-
Available on BuildContext, provided by the ContextExtensions extension
Check if the current theme is dark modeno setter - isDesktop → bool
-
Available on BuildContext, provided by the ContextExtensions extension
Check if the screen width corresponds to a desktopno setter - isLandscape → bool
-
Available on BuildContext, provided by the ContextExtensions extension
Check if the screen is in landscape modeno setter - isTablet → bool
-
Available on BuildContext, provided by the ContextExtensions extension
Check if the screen width corresponds to a tabletno setter - keyboardHeight → double
-
Available on BuildContext, provided by the ContextExtensions extension
Access current keyboard heightno setter - mediaQueryPadding → EdgeInsets
-
Available on BuildContext, provided by the ContextExtensions extension
Access current padding (e.g., safe area)no setter - orientation → Orientation
-
Available on BuildContext, provided by the ContextExtensions extension
Access current screen orientationno setter - safeHeight → double
-
Available on BuildContext, provided by the ContextExtensions extension
Access safe height (excluding top and bottom safe area paddings)no setter - safeWidth → double
-
Available on BuildContext, provided by the ContextExtensions extension
Access safe width (excluding left and right safe area paddings)no setter - textTheme → TextTheme
-
Available on BuildContext, provided by the ContextExtensions extension
Access the current TextTheme quicklyno setter - theme → ThemeData
-
Available on BuildContext, provided by the ContextExtensions extension
Access the current ThemeData quicklyno setter - viewInsets → EdgeInsets
-
Available on BuildContext, provided by the ContextExtensions extension
Access current viewInsets (e.g., keyboard height)no setter - width → double
-
Available on BuildContext, provided by the ContextExtensions extension
Access current screen widthno setter
Methods
-
hideKeyboard(
) → void -
Available on BuildContext, provided by the ContextExtensions extension
Hides the soft keyboard -
pop<
T> ([T? result]) → void -
Available on BuildContext, provided by the ContextExtensions extension
Simplifies Navigator.pop -
push<
T> (Widget page) → Future< T?> -
Available on BuildContext, provided by the ContextExtensions extension
Simplifies Navigator.push -
pushAndRemoveUntil<
T> (Widget page) → Future< T?> -
Available on BuildContext, provided by the ContextExtensions extension
Simplifies Navigator.pushAndRemoveUntil -
pushReplacement<
T, TO> (Widget page) → Future< T?> -
Available on BuildContext, provided by the ContextExtensions extension
Simplifies Navigator.pushReplacement -
showSnackBar(
String message, {Duration duration = const Duration(seconds: 2)}) → void -
Available on BuildContext, provided by the ContextExtensions extension
Show a snackbar quickly