ContextExtension extension

An extension on BuildContext to provide convenient access to various properties.

on

Properties

alwaysUse24HourFormat bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the 24-hour format is always used.
no setter
backgroundColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the background color from the color scheme of the theme data.
no setter
blockSizeHorizontal double

Available on BuildContext, provided by the ContextExtension extension

Returns the horizontal block size, which is the width divided by 100.
no setter
blockSizeVertical double

Available on BuildContext, provided by the ContextExtension extension

Returns the vertical block size, which is the height divided by 100.
no setter
bodyLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the large body text style from the text theme.
no setter
bodyMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the medium body text style from the text theme.
no setter
bodySmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the small body text style from the text theme.
no setter
buttonTheme ButtonThemeData

Available on BuildContext, provided by the ContextExtension extension

Returns the ButtonThemeData from the theme data.
no setter
canvasColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the canvas color from the theme data.
no setter
cardColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the card color from the theme data.
no setter
devicePixelRatio double

Available on BuildContext, provided by the ContextExtension extension

Returns the device pixel ratio of the media query.
no setter
disabledColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the disabled color from the theme data.
no setter
displayLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the large display text style from the text theme.
no setter
displayMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the medium display text style from the text theme.
no setter
displaySmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the small display text style from the text theme.
no setter
dividerColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the divider color from the theme data.
no setter
errorColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the error color from the color scheme of the theme data.
no setter
headlineMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the medium headline text style from the text theme.
no setter
headlineSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the small headline text style from the text theme.
no setter
height double

Available on BuildContext, provided by the ContextExtension extension

Returns the height of the media query.
no setter
highlightColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the highlight color from the theme data.
no setter
hintColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the hint color from the theme data.
no setter
isLandscape bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the orientation is landscape.
no setter
isLg bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is between 992 (inclusive) and 1200 (exclusive).
no setter
isMd bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is between 768 (inclusive) and 992 (exclusive).
no setter
isMobile bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the platform is mobile or the width is less than 600.
no setter
isPortrait bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the orientation is portrait.
no setter
isSm bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is between 576 (inclusive) and 768 (exclusive).
no setter
isXl bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is between 1200 (inclusive) and 1400 (exclusive).
no setter
isXs bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is less than 576.
no setter
isXXL bool

Available on BuildContext, provided by the ContextExtension extension

Returns true if the width is greater than or equal to 1400.
no setter
labelLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the large label text style from the text theme.
no setter
labelMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the medium label text style from the text theme.
no setter
labelSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the small label text style from the text theme.
no setter
mediaQuery MediaQueryData

Available on BuildContext, provided by the ContextExtension extension

Returns the MediaQueryData associated with this context.
no setter
mediaQueryPadding EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns the padding of the media query.
no setter
mediaQueryViewInsets EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns the view insets of the media query.
no setter
mediaQueryViewPadding EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns the view padding of the media query.
no setter

Available on BuildContext, provided by the ContextExtension extension

Returns the NavigatorState associated with this context.
no setter
orientation Orientation

Available on BuildContext, provided by the ContextExtension extension

Returns the orientation of the media query.
no setter
platformBrightness Brightness

Available on BuildContext, provided by the ContextExtension extension

Returns the platform brightness of the media query.
no setter
primaryColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the primary color from the theme data.
no setter
primaryColorDark Color

Available on BuildContext, provided by the ContextExtension extension

Returns the dark primary color from the theme data.
no setter
primaryColorLight Color

Available on BuildContext, provided by the ContextExtension extension

Returns the light primary color from the theme data.
no setter
primaryIconTheme IconThemeData

Available on BuildContext, provided by the ContextExtension extension

Returns the IconThemeData for the primary icon from the theme data.
no setter
scaffoldBackgroundColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the scaffold background color from the theme data.
no setter
secondaryHeaderColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the secondary header color from the theme data.
no setter
shadowColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the shadow color from the theme data.
no setter
shortestSide double

Available on BuildContext, provided by the ContextExtension extension

Returns the shortest side of the media query size.
no setter
size Size

Available on BuildContext, provided by the ContextExtension extension

Returns the Size of the media query.
no setter
snackBarTheme SnackBarThemeData

Available on BuildContext, provided by the ContextExtension extension

Returns the SnackBarThemeData from the theme data.
no setter
splashColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the splash color from the theme data.
no setter
textTheme TextTheme

Available on BuildContext, provided by the ContextExtension extension

Returns the TextTheme from the theme data.
no setter
themeData ThemeData

Available on BuildContext, provided by the ContextExtension extension

Returns the ThemeData associated with this context.
no setter
titleLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the large title text style from the text theme.
no setter
titleMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the medium title text style from the text theme.
no setter
titleSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the small title text style from the text theme.
no setter
unselectedWidgetColor Color

Available on BuildContext, provided by the ContextExtension extension

Returns the unselected widget color from the theme data.
no setter
width double

Available on BuildContext, provided by the ContextExtension extension

Returns the width of the media query.
no setter