ContextExtensionss extension
BuildContext extension with some ui utils methods and getters
- on
Properties
- devicePixelRatio → double
-
similar to MediaQuery.of(this).devicePixelRatio
no setter
- height → double
-
The same of MediaQuery.of(context).size.height
Note: updates when you rezise your screen (like on a browser or
desktop window)
no setter
- isDarkMode → bool
-
return true if the current app mode is dark
no setter
- isLandscape → bool
-
check if device is on landscape mode
no setter
- isLargeTablet → bool
-
True if the shortestSide is largest than 720p
no setter
- isPhone → bool
-
True if the shortestSide is smaller than 600p
no setter
- isPortrait → bool
-
check if device is on portrait mode
no setter
- isSmallPhone → bool
-
True if the shortestSide is smaller than 480p
no setter
- isSmallTablet → bool
-
True if the shortestSide is largest than 600p
no setter
- isTablet → bool
-
True if the current device is Tablet
no setter
- mediaQuery → MediaQueryData
-
similar to MediaQuery.of(context).padding
no setter
- mediaQueryPadding → EdgeInsets
-
similar to MediaQuery.of(context).padding
no setter
- mediaQueryShortestSide → double
-
get the shortestSide from screen
no setter
- mediaQuerySize → Size
-
The same of MediaQuery.of(context).size
no setter
- mediaQueryViewInsets → EdgeInsets
-
similar to MediaQuery.of(context).viewInsets
no setter
- mediaQueryViewPadding → EdgeInsets
-
similar to MediaQuery.of(context).viewPadding
no setter
- orientation → Orientation
-
similar to MediaQuery.of(context).orientation
no setter
- textScaleFactor → double
-
similar to MediaQuery.of(this).textScaleFactor
no setter
- textTheme → TextTheme
-
similar to MediaQuery.of(context).padding
no setter
- theme → ThemeData
-
similar to MediaQuery.of(context).padding
no setter
- width → double
-
The same of MediaQuery.of(context).size.width
Note: updates when you rezise your screen (like on a browser or
desktop window)
no setter