ContextExtensions extension

on

Properties

height double
Returns same as MediaQuery.of(context).height
no setter
isLandscape bool
Returns if Orientation is landscape
no setter
mq MediaQueryData
no setter
sizeX Size
Returns same as MediaQuery.of(context).size
no setter
width double
Returns same as MediaQuery.of(context).size.width
no setter

Methods

makeFirst(Widget screen, {bool transparent = false, bool isCupertino = false}) → void
Replace the all route of the navigator by pushing the given route and then disposing all the previous route.
maybePop() → void
Consults the current route's Route.willPop 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
Pop the top-most route off the navigator.
popToFirst() → void
Pops the top-most route off the navigator till the first route.
push<T>(Widget screen, {bool transparent = false, bool isCupertino = false}) Future<T?>
Push the given route onto the navigator.
pushAfterFirst(Widget screen, {bool transparent = false, bool isCupertino = false}) → void
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>
Replace the current route of the navigator by pushing the given route and then disposing the previous route.
setFocus({FocusNode? focusNode}) → void
Requests the primary focus for this node, or for a supplied node, which will also give focus to its ancestors.