BuildContextExt extension

on

Properties

bottomPadding double

Available on BuildContext, provided by the BuildContextExt extension

Get the bottom padding of the MediaQuery
no setter
brightness Brightness

Available on BuildContext, provided by the BuildContextExt extension

Returns current brightness independent of the theme.
no setter
colorScheme ColorScheme

Available on BuildContext, provided by the BuildContextExt extension

Get the current ColorScheme
no setter
devicePixelRatio double

Available on BuildContext, provided by the BuildContextExt extension

Get the device pixel ratio
no setter
isDarkMode bool

Available on BuildContext, provided by the BuildContextExt extension

Get the device dark mode
no setter
isHighContrast bool

Available on BuildContext, provided by the BuildContextExt extension

Returns true if device accessibility high contrast is enabled.
no setter
isKeyboardVisible bool

Available on BuildContext, provided by the BuildContextExt extension

Get if keyboard is visible
no setter
isLandscape bool

Available on BuildContext, provided by the BuildContextExt extension

Check if the device orientation is landscape
no setter
isLTR bool

Available on BuildContext, provided by the BuildContextExt extension

Check if the current directionality is left-to-right
no setter
isPortrait bool

Available on BuildContext, provided by the BuildContextExt extension

Check if the device orientation is portrait
no setter
isRTL bool

Available on BuildContext, provided by the BuildContextExt extension

Check if the current directionality is right-to-left
no setter
isScreenSmall bool

Available on BuildContext, provided by the BuildContextExt extension

Returns true if width < 360px (useful for responsive).
no setter
isTablet bool

Available on BuildContext, provided by the BuildContextExt extension

Check if the device is tablet-sized (shortestSide ≥ 600)
no setter
keyboardHeight double

Available on BuildContext, provided by the BuildContextExt extension

Get the height of the keyboard
no setter
orientation Orientation

Available on BuildContext, provided by the BuildContextExt extension

Get the device orientation
no setter
textTheme TextTheme

Available on BuildContext, provided by the BuildContextExt extension

Get the current TextTheme
no setter
theme ThemeData

Available on BuildContext, provided by the BuildContextExt extension

Get the current ThemeData
no setter
topPadding double

Available on BuildContext, provided by the BuildContextExt extension

Get the top padding of the MediaQuery
no setter
widgetPosition Offset

Available on BuildContext, provided by the BuildContextExt extension

Returns global position of the widget.
no setter
widgetSize Size

Available on BuildContext, provided by the BuildContextExt extension

Returns the size of the widget tied to this context.
no setter

Methods

hideKeyboard() → void

Available on BuildContext, provided by the BuildContextExt extension

Hide keyboard
pop() → void

Available on BuildContext, provided by the BuildContextExt extension

Pop the current route off the navigator stack
push(Widget page) → void

Available on BuildContext, provided by the BuildContextExt extension

Push a new page with MaterialPageRoute
pushNamed(String routeName) → void

Available on BuildContext, provided by the BuildContextExt extension

Push a new page with MaterialPageRoute and the given name