ContextExtension extension

Extension on BuildContext to provide convenient access to various properties and methods.

on

Properties

bodyLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for body large text.
no setter
bodyMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for body medium text.
no setter
bodySmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for body small text.
no setter
brightness Brightness

Available on BuildContext, provided by the ContextExtension extension

Returns the platform brightness.
no setter
devicePixelRatio double

Available on BuildContext, provided by the ContextExtension extension

Returns the device pixel ratio.
no setter
displayLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for display large text.
no setter
displayMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for display medium text.
no setter
displaySmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for display small text.
no setter
headlineLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for headline large text.
no setter
headlineMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for headline medium text.
no setter
headlineSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for headline small text.
no setter
height double

Available on BuildContext, provided by the ContextExtension extension

Returns the height of the current screen.
no setter
isDark bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the current theme is dark.
no setter
isDesktop bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the current window size is considered desktop.
no setter
isLandscape bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the device is in landscape mode.
no setter
isLight bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the current theme is light.
no setter
isMobile bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the current window size is considered mobile.
no setter
isPortrait bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the device is in portrait mode.
no setter
isTablet bool

Available on BuildContext, provided by the ContextExtension extension

Checks if the current window size is considered tablet.
no setter
labelLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for label large text.
no setter
labelMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for label medium text.
no setter
labelSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for label small text.
no setter
mq MediaQueryData

Available on BuildContext, provided by the ContextExtension extension

Returns the MediaQueryData for the current context.
no setter

Available on BuildContext, provided by the ContextExtension extension

Returns the nearest ancestor NavigatorState.
no setter
orientation Orientation

Available on BuildContext, provided by the ContextExtension extension

Returns the current orientation of the device.
no setter
screenDensity double

Available on BuildContext, provided by the ContextExtension extension

Returns the device pixel ratio of the current screen.
no setter
screenPadding EdgeInsets

Available on BuildContext, provided by the ContextExtension extension

Returns the padding of the current screen.
no setter
size Size

Available on BuildContext, provided by the ContextExtension extension

Returns the Size of the current screen.
no setter
textScaleFactor TextScaler

Available on BuildContext, provided by the ContextExtension extension

Returns the text scaler.
no setter
textTheme TextTheme

Available on BuildContext, provided by the ContextExtension extension

Returns the current TextTheme.
no setter
theme ThemeData

Available on BuildContext, provided by the ContextExtension extension

Returns the current ThemeData.
no setter
titleLarge TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for title large text.
no setter
titleMedium TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for title medium text.
no setter
titleSmall TextStyle?

Available on BuildContext, provided by the ContextExtension extension

Returns the TextStyle for title small text.
no setter
width double

Available on BuildContext, provided by the ContextExtension extension

Returns the width of the current screen.
no setter

Methods

pop<T>([T? result]) → void

Available on BuildContext, provided by the ContextExtension extension

Pops the current route off the navigator.
push<T>(Route<T> route) Future<T?>

Available on BuildContext, provided by the ContextExtension extension

Pushes a new route onto the navigator.
pushNamed<T>(String routeName, {Object? arguments}) Future<T?>

Available on BuildContext, provided by the ContextExtension extension

Pushes a named route onto the navigator.
showSnackBar(String message) → void

Available on BuildContext, provided by the ContextExtension extension

Shows a SnackBar with the given message.