BuildContextExtension extension

A set of useful extensions for BuildContext.

on

Properties

focus → FocusScopeNode

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest FocusScopeNode instance for the current context.
no setter
hasMaterialL10n → bool

Available on BuildContext, provided by the BuildContextExtension extension

Returns true if the current BuildContext has a MaterialLocalizations instance associated with it.
no setter
isRtl → bool

Available on BuildContext, provided by the BuildContextExtension extension

Whether the current text direction is right-to-left.
no setter
materialL10n → MaterialLocalizations

Available on BuildContext, provided by the BuildContextExtension extension

Returns the MaterialLocalizations instance for the current context.
no setter
maybeMessenger → ScaffoldMessengerState?

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest ScaffoldMessengerState for the current context or null if no ScaffoldMessenger ancestor is found.
no setter
maybeScaffold → ScaffoldState?

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest ScaffoldState instance for the current context or null if no Scaffold ancestor is found.
no setter
media → MediaQueryData

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest MediaQueryData instance for the current context.
no setter
messenger → ScaffoldMessengerState

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest ScaffoldMessengerState instance for the current context.
no setter
padding → EdgeInsets

Available on BuildContext, provided by the BuildContextExtension extension

Returns the padding from the nearest MediaQueryData instance for the current context.
no setter
scaffold → ScaffoldState

Available on BuildContext, provided by the BuildContextExtension extension

Returns the nearest ScaffoldState instance for the current context.
no setter
theme → ThemeData

Available on BuildContext, provided by the BuildContextExtension extension

Returns the ThemeData instance for the current context.
no setter

Methods

showSnackBar(SnackBar snackBar) → ScaffoldFeatureController<SnackBar, SnackBarClosedReason>

Available on BuildContext, provided by the BuildContextExtension extension

Shows a SnackBar at the bottom of the screen.