BuildContextExtensions extension

Convenience getters for MediaQuery, Theme, and device breakpoints.

on

Properties

accentColor → Color

Available on BuildContext, provided by the BuildContextExtensions extension

The color scheme's secondary (accent) color.
no setter
colorScheme → ColorScheme

Available on BuildContext, provided by the BuildContextExtensions extension

The theme's ColorScheme.
no setter
devicePixelRatio → double

Available on BuildContext, provided by the BuildContextExtensions extension

Logical pixels per physical pixel.
no setter
iconTheme → IconThemeData

Available on BuildContext, provided by the BuildContextExtensions extension

The theme's IconThemeData.
no setter
isDesktop → bool

Available on BuildContext, provided by the BuildContextExtensions extension

Whether the screen width is 1200 logical pixels or more.
no setter
isLandscape → bool

Available on BuildContext, provided by the BuildContextExtensions extension

Whether the orientation is landscape.
no setter
isMobile → bool

Available on BuildContext, provided by the BuildContextExtensions extension

Whether the screen width is below 600 logical pixels.
no setter
isPortrait → bool

Available on BuildContext, provided by the BuildContextExtensions extension

Whether the orientation is portrait.
no setter
isTablet → bool

Available on BuildContext, provided by the BuildContextExtensions extension

Whether the screen width is 600-1199 logical pixels.
no setter
locale → Locale

Available on BuildContext, provided by the BuildContextExtensions extension

Current locale.
no setter
mediaQuery → MediaQueryData

Available on BuildContext, provided by the BuildContextExtensions extension

The full MediaQueryData.
no setter
orientation → Orientation

Available on BuildContext, provided by the BuildContextExtensions extension

Current screen orientation.
no setter
primaryColor → Color

Available on BuildContext, provided by the BuildContextExtensions extension

The theme's primary color.
no setter
safePadding → EdgeInsets

Available on BuildContext, provided by the BuildContextExtensions extension

Safe-area padding (status bar / notches).
no setter
scaffoldBackgroundColor → Color

Available on BuildContext, provided by the BuildContextExtensions extension

The Scaffold background color from the theme.
no setter
screenHeight → double

Available on BuildContext, provided by the BuildContextExtensions extension

Screen height in logical pixels.
no setter
screenSize → Size

Available on BuildContext, provided by the BuildContextExtensions extension

Screen size in logical pixels.
no setter
screenWidth → double

Available on BuildContext, provided by the BuildContextExtensions extension

Screen width in logical pixels.
no setter
textDirection → TextDirection

Available on BuildContext, provided by the BuildContextExtensions extension

Current text direction.
no setter
textScaler → TextScaler

Available on BuildContext, provided by the BuildContextExtensions extension

Current text scaling.
no setter
textTheme → TextTheme

Available on BuildContext, provided by the BuildContextExtensions extension

The theme's TextTheme.
no setter
theme → ThemeData

Available on BuildContext, provided by the BuildContextExtensions extension

The current ThemeData.
no setter
viewInsets → EdgeInsets

Available on BuildContext, provided by the BuildContextExtensions extension

Insets obscured by system UI (e.g. the keyboard).
no setter
viewPadding → EdgeInsets

Available on BuildContext, provided by the BuildContextExtensions extension

Padding obscured by system UI, unaffected by the keyboard.
no setter

Methods

hideKeyboard() → void

Available on BuildContext, provided by the BuildContextExtensions extension

Dismisses the keyboard if it is open.