ContextExtension extension

An extension on BuildContext providing quick access to common screen and theme properties.

Useful for responsive design, system UI calculations, and adapting to theme mode.

on

Properties

isDarkMode bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the current theme is dark mode.
no setter
isLandscape bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the device is currently in landscape orientation.
no setter
isPortrait bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the device is currently in portrait orientation.
no setter
isTabletSize bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the device is considered a tablet (shortest side >= 600dp).
no setter
paddingBottom double

Available on BuildContext, provided by the ContextExtension extension

Returns the bottom system padding (e.g., for gesture navigation or system bar).
no setter
paddingLeft double

Available on BuildContext, provided by the ContextExtension extension

Returns the left system padding (e.g., for notched devices).
no setter
paddingRight double

Available on BuildContext, provided by the ContextExtension extension

Returns the right system padding.
no setter
paddingTop double

Available on BuildContext, provided by the ContextExtension extension

Returns the top system padding (e.g., status bar height).
no setter
screenHeight double

Available on BuildContext, provided by the ContextExtension extension

Returns the total height of the screen in logical pixels.
no setter
screenHeightWithoutSystemBars double

Available on BuildContext, provided by the ContextExtension extension

Returns the screen height excluding top and bottom system paddings.
no setter
screenWidth double

Available on BuildContext, provided by the ContextExtension extension

Returns the total width of the screen in logical pixels.
no setter