ContextExtensionss extension Null safety

on

Properties

devicePixelRatio double
similar to MediaQuery.of(this).devicePixelRatio
read-only
height double
The same of MediaQuery.of(context).size.height Note: updates when you rezise your screen (like on a browser or desktop window)
read-only
iconColor Color?
give access to Theme.of(context).iconTheme.color
read-only
isDarkMode bool
Check if dark mode theme is enable
read-only
isLandscape bool
check if device is on landscape mode
read-only
isLargeTablet bool
True if the shortestSide is largest than 720p
read-only
isPhone bool
True if the shortestSide is smaller than 600p
read-only
isPortrait bool
check if device is on portrait mode
read-only
isSmallTablet bool
True if the shortestSide is largest than 600p
read-only
isTablet bool
True if the current device is Tablet
read-only
mediaQuery MediaQueryData
similar to MediaQuery.of(context).padding
read-only
mediaQueryPadding EdgeInsets
similar to MediaQuery.of(context).padding
read-only
mediaQueryShortestSide double
get the shortestSide from screen
read-only
mediaQuerySize Size
The same of MediaQuery.of(context).size
read-only
mediaQueryViewInsets EdgeInsets
similar to MediaQuery.of(context).viewInsets
read-only
mediaQueryViewPadding EdgeInsets
similar to MediaQuery.of(context).viewPadding
read-only
orientation Orientation
similar to MediaQuery.of(context).orientation
read-only
showNavbar bool
True if width be larger than 800
read-only
textScaleFactor double
similar to MediaQuery.of(this).textScaleFactor
read-only
textTheme TextTheme
similar to MediaQuery.of(context).padding
read-only
theme ThemeData
similar to MediaQuery.of(context).padding
read-only
width double
The same of MediaQuery.of(context).size.width Note: updates when you rezise your screen (like on a browser or desktop window)
read-only

Methods

heightTransformer({double dividedBy = 1, double reducedBy = 0.0}) double
Gives you the power to get a portion of the height. Useful for responsive applications. [...]
ratio({double dividedBy = 1, double reducedByW = 0.0, double reducedByH = 0.0}) double
Divide the height proportionally by the given value
responsiveValue<T>({T? mobile, T? tablet, T? desktop, T? watch}) → T
Returns a specific value according to the screen size if the device width is higher than or equal to 1200 return desktop value. if the device width is higher than or equal to 600 and less than 1200 return tablet value. if the device width is less than 300 return watch value. in other cases return mobile value.
widthTransformer({double dividedBy = 1, double reducedBy = 0.0}) double
Gives you the power to get a portion of the width. Useful for responsive applications. [...]