ContextExt extension

on

Properties

devicePixelRatio double

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.devicePixelRatioOf(context)
no setter
height double

Available on BuildContext, provided by the ContextExt extension

The same of MediaQuery.of(context).size.height Note: updates when you resize your screen (like on a browser or desktop window)
no setter
iconColor Color?

Available on BuildContext, provided by the ContextExt extension

give access to Theme.of(context).iconTheme.color
no setter
isDarkMode bool

Available on BuildContext, provided by the ContextExt extension

Check if dark mode theme is enable
no setter
isDesktop bool

Available on BuildContext, provided by the ContextExt extension

same as isDesktopOrLess
no setter
isDesktopOrLess bool

Available on BuildContext, provided by the ContextExt extension

True if the width is smaller than 1200p
no setter
isDesktopOrWider bool

Available on BuildContext, provided by the ContextExt extension

True if the width is higher than 1200p
no setter
isLandscape bool

Available on BuildContext, provided by the ContextExt extension

check if device is on landscape mode
no setter
isLargeTablet bool

Available on BuildContext, provided by the ContextExt extension

True if the shortestSide is largest than 720p
no setter
isLargeTabletOrLess bool

Available on BuildContext, provided by the ContextExt extension

True if the width is smaller than 720p
no setter
isLargeTabletOrWider bool

Available on BuildContext, provided by the ContextExt extension

True if the width is higher than 720p
no setter
isPhone bool

Available on BuildContext, provided by the ContextExt extension

True if the shortestSide is smaller than 600p
no setter
isPhoneOrLess bool

Available on BuildContext, provided by the ContextExt extension

True if the width is smaller than 600p
no setter
isPhoneOrWider bool

Available on BuildContext, provided by the ContextExt extension

True if the width is higher than 600p
no setter
isPortrait bool

Available on BuildContext, provided by the ContextExt extension

check if device is on portrait mode
no setter
isSmallTablet bool

Available on BuildContext, provided by the ContextExt extension

True if the shortestSide is largest than 600p
no setter
isSmallTabletOrLess bool

Available on BuildContext, provided by the ContextExt extension

True if the width is smaller than 600p
no setter
isSmallTabletOrWider bool

Available on BuildContext, provided by the ContextExt extension

True if the width is higher than 600p
no setter
isTablet bool

Available on BuildContext, provided by the ContextExt extension

True if the current device is Tablet
no setter
mediaQuery MediaQueryData

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.of(context).padding
no setter
mediaQueryPadding EdgeInsets

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.paddingOf(context)
no setter
mediaQueryShortestSide double

Available on BuildContext, provided by the ContextExt extension

get the shortestSide from screen
no setter
mediaQuerySize Size

Available on BuildContext, provided by the ContextExt extension

The same of MediaQuery.sizeOf(context)
no setter
mediaQueryViewInsets EdgeInsets

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.viewInsetsOf(context)
no setter
mediaQueryViewPadding EdgeInsets

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.viewPaddingOf(context)
no setter
orientation Orientation

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.orientationOf(context)
no setter
showNavbar bool

Available on BuildContext, provided by the ContextExt extension

True if width be larger than 800
no setter
textScaleFactor TextScaler

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.textScaleFactorOf(context)
no setter
textTheme TextTheme

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.of(context).padding
no setter
theme ThemeData

Available on BuildContext, provided by the ContextExt extension

similar to MediaQuery.of(context).padding
no setter
width double

Available on BuildContext, provided by the ContextExt extension

The same of MediaQuery.of(context).size.width Note: updates when you resize your screen (like on a browser or desktop window)
no setter

Methods

heightTransformer({double dividedBy = 1, double reducedBy = 0.0}) double

Available on BuildContext, provided by the ContextExt extension

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

Available on BuildContext, provided by the ContextExt extension

Divide the height proportionally by the given value
responsiveValue<T>({T? watch, T? mobile, T? tablet, T? desktop}) → T

Available on BuildContext, provided by the ContextExt extension

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

Available on BuildContext, provided by the ContextExt extension

Gives you the power to get a portion of the width. Useful for responsive applications.