ContextExt extension

An extension for the BuildContext class providing convenient access to common MediaQuery properties and theme information.

on

Properties

cDevicePixelRatio double

Available on BuildContext, provided by the ContextExt extension

Returns the device pixel ratio obtained from MediaQuery.of(this).devicePixelRatio.
no setter
cHeight double

Available on BuildContext, provided by the ContextExt extension

Returns the height of the screen obtained from MediaQuery.of(context).size.height.
no setter
cIconColor Color?

Available on BuildContext, provided by the ContextExt extension

Returns the icon color from the current theme obtained from Theme.of(context).iconTheme.color.
no setter
cIsDarkMode bool

Available on BuildContext, provided by the ContextExt extension

Checks if the dark mode theme is enabled by comparing the brightness from Theme.of(context).
no setter
cIsLand bool

Available on BuildContext, provided by the ContextExt extension

Checks if the device screen is in landscape mode by comparing the orientation from MediaQuery.of(context).
no setter
cIsPort bool

Available on BuildContext, provided by the ContextExt extension

Checks if the device screen is in portrait mode by comparing the orientation from MediaQuery.of(context).
no setter
cIsTablet bool

Available on BuildContext, provided by the ContextExt extension

Returns true if the device is identified as a tablet based on its screen size.
no setter
cMQuery MediaQueryData

Available on BuildContext, provided by the ContextExt extension

Returns the MediaQueryData object obtained from MediaQuery.of(context).
no setter
cOrient Orientation

Available on BuildContext, provided by the ContextExt extension

Returns the orientation of the device screen obtained from MediaQuery.of(context).orientation.
no setter
cSize Size

Available on BuildContext, provided by the ContextExt extension

Returns the size of the screen obtained from MediaQuery.of(context).size.
no setter
cTextTheme TextTheme

Available on BuildContext, provided by the ContextExt extension

Returns the text theme from the current theme obtained from Theme.of(context).textTheme.
no setter
cTheme ThemeData

Available on BuildContext, provided by the ContextExt extension

Returns the current theme data obtained from Theme.of(context).
no setter
cWidth double

Available on BuildContext, provided by the ContextExt extension

Returns the width of the screen obtained from MediaQuery.of(context).size.width.
no setter