ContextExtensions extension

on

Properties

height → double

Available on BuildContext, provided by the ContextExtensions extension

Returns same as MediaQuery.of(context).height
no setter
isLandscape → bool

Available on BuildContext, provided by the ContextExtensions extension

Returns if Orientation is landscape
no setter
mq → MediaQueryData

Available on BuildContext, provided by the ContextExtensions extension

no setter
sizeX → Size

Available on BuildContext, provided by the ContextExtensions extension

Returns same as MediaQuery.of(context).size
no setter
width → double

Available on BuildContext, provided by the ContextExtensions extension

Returns same as MediaQuery.of(context).size.width
no setter

Methods

makeFirst(Widget screen, {bool transparent = false, bool isCupertino = false}) → void

Available on BuildContext, provided by the ContextExtensions extension

Replace the all route of the navigator by pushing the given route and then disposing all the previous route.
maybePop() → void

Available on BuildContext, provided by the ContextExtensions extension

Consults the current route's Route.popDisposition method, and acts accordingly, potentially popping the route as a result; returns whether the pop request should be considered handled.
pop<T>({T? data}) → void

Available on BuildContext, provided by the ContextExtensions extension

Pop the top-most route off the navigator.
popToFirst() → void

Available on BuildContext, provided by the ContextExtensions extension

Pops the top-most route off the navigator till the first route.
push<T>(Widget screen, {bool transparent = false, bool isCupertino = false}) → Future<T?>

Available on BuildContext, provided by the ContextExtensions extension

Push the given route onto the navigator.
pushAfterFirst(Widget screen, {bool transparent = false, bool isCupertino = false}) → void

Available on BuildContext, provided by the ContextExtensions extension

Replace the all route of the navigator by pushing the given route and then disposing all the previous route.
replace(Widget screen, {bool transparent = false, bool isCupertino = false}) → Future<void>

Available on BuildContext, provided by the ContextExtensions extension

Replace the current route of the navigator by pushing the given route and then disposing the previous route.
setFocus({FocusNode? focusNode}) → void

Available on BuildContext, provided by the ContextExtensions extension

Requests the primary focus for this node, or for a supplied node, which will also give focus to its ancestors.