ContextExtension extension

Common get value with BuildContext

on

Properties

blocArchitecturel10n → BlocArchitectureLocalizations?

Available on BuildContext, provided by the ContextExtension extension

Callers can lookup localized strings with an instance of BlocArchitectureLocalizations
no setter
colorScheme ColorScheme

Available on BuildContext, provided by the ContextExtension extension

similar to Theme.of(context).colorScheme
no setter
isLandscape bool

Available on BuildContext, provided by the ContextExtension extension

check if device is on landscape mode
no setter
isLargeTablet bool

Available on BuildContext, provided by the ContextExtension extension

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

Available on BuildContext, provided by the ContextExtension extension

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

Available on BuildContext, provided by the ContextExtension extension

check if device is on portrait mode
no setter
isSmallTablet bool

Available on BuildContext, provided by the ContextExtension extension

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

Available on BuildContext, provided by the ContextExtension extension

True if the current device is Tablet
no setter
mediaQueryOrientation Orientation

Available on BuildContext, provided by the ContextExtension extension

Returns MediaQueryData.orientation for the nearest MediaQuery ancestor or throws an exception, if no such ancestor exists.
no setter
mediaQueryShortestSide double

Available on BuildContext, provided by the ContextExtension extension

get the shortestSide from screen
no setter
mediaQuerySize Size

Available on BuildContext, provided by the ContextExtension extension

Returns MediaQueryData.size from the nearest MediaQuery ancestor or throws an exception, if no such ancestor exists.
no setter
mediaQueryViewInsets EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns MediaQueryData.viewInsets for the nearest MediaQuery ancestor or throws an exception, if no such ancestor exists.
no setter
mediaQueryViewPadding EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns MediaQueryData.viewPadding for the nearest MediaQuery ancestor or throws an exception, if no such ancestor exists.
no setter
messenger ScaffoldMessengerState

Available on BuildContext, provided by the ContextExtension extension

Manages SnackBars and MaterialBanners for descendant Scaffolds.
no setter
platformBrightness Brightness

Available on BuildContext, provided by the ContextExtension extension

Returns MediaQueryData.platformBrightness for the nearest MediaQuery ancestor or Brightness.light, if no such ancestor exists.
no setter
textTheme TextTheme

Available on BuildContext, provided by the ContextExtension extension

similar to Theme.of(context).textStyle
no setter
theme ThemeData

Available on BuildContext, provided by the ContextExtension extension

A theme describes the colors and typographic choices of an application.
no setter

Methods

responsiveValue<T>({required T mobile, T? tablet, T? desktop, T? watch}) → T

Available on BuildContext, provided by the ContextExtension 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.