ContextExt extension
An extension for the BuildContext
class providing convenient access to common MediaQuery properties and theme information.
- on
Properties
- cDevicePixelRatio → double
-
Returns the device pixel ratio obtained from MediaQuery.of(this).devicePixelRatio.
no setter
- cHeight → double
-
Returns the height of the screen obtained from MediaQuery.of(context).size.height.
no setter
- cIconColor → Color?
-
Returns the icon color from the current theme obtained from Theme.of(context).iconTheme.color.
no setter
- cIsDarkMode → bool
-
Checks if the dark mode theme is enabled by comparing the brightness from Theme.of(context).
no setter
- cIsLand → bool
-
Checks if the device screen is in landscape mode by comparing the orientation from MediaQuery.of(context).
no setter
- cIsPort → bool
-
Checks if the device screen is in portrait mode by comparing the orientation from MediaQuery.of(context).
no setter
- cIsTablet → bool
-
Returns
true
if the device is identified as a tablet based on its screen size.no setter - cMQuery → MediaQueryData
-
Returns the
MediaQueryData
object obtained from MediaQuery.of(context).no setter - cOrient → Orientation
-
Returns the orientation of the device screen obtained from MediaQuery.of(context).orientation.
no setter
- cSize → Size
-
Returns the size of the screen obtained from MediaQuery.of(context).size.
no setter
- cTextTheme → TextTheme
-
Returns the text theme from the current theme obtained from Theme.of(context).textTheme.
no setter
- cTheme → ThemeData
-
Returns the current theme data obtained from Theme.of(context).
no setter
- cWidth → double
-
Returns the width of the screen obtained from MediaQuery.of(context).size.width.
no setter