BuildContextExtensions extension

Extension methods for BuildContext.

on

Properties

colorScheme ColorScheme

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the current color scheme.
no setter
isDarkMode bool

Available on BuildContext, provided by the BuildContextExtensions extension

Checks if the current theme is dark mode.
no setter
isDesktop bool

Available on BuildContext, provided by the BuildContextExtensions extension

Checks if the device is desktop (width >= 1024).
no setter
isMobile bool

Available on BuildContext, provided by the BuildContextExtensions extension

Checks if the device is mobile (width < 600).
no setter
isTablet bool

Available on BuildContext, provided by the BuildContextExtensions extension

Checks if the device is tablet (600 <= width < 1024).
no setter
padding EdgeInsets

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the safe area padding.
no setter
screenHeight double

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the screen height.
no setter
screenWidth double

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the screen width.
no setter
textTheme TextTheme

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the current text theme.
no setter
theme ThemeData

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the current theme.
no setter
viewInsets EdgeInsets

Available on BuildContext, provided by the BuildContextExtensions extension

Returns the view insets (e.g., keyboard height).
no setter

Methods

hideSnackBar() → void

Available on BuildContext, provided by the BuildContextExtensions extension

Hides the current snackbar.
showSnackBar(String message) → void

Available on BuildContext, provided by the BuildContextExtensions extension

Shows a snackbar with the given message.
unfocus() → void

Available on BuildContext, provided by the BuildContextExtensions extension

Unfocuses the current focus node (hides keyboard).