BuildContextExension extension

on

Properties

accentColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns accentColor Color
no setter
canPop bool

Available on BuildContext, provided by the BuildContextExension extension

Route.isFirst, which returns true for routes for which canPop returns false.
no setter
cardColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns cardColor Color
no setter
defaultTextStyle DefaultTextStyle

Available on BuildContext, provided by the BuildContextExension extension

Returns DefaultTextStyle.of(context)
no setter
dividerColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns dividerColor Color
no setter
formState FormState?

Available on BuildContext, provided by the BuildContextExension extension

Returns Form.of(context)
no setter
getArguments → dynamic

Available on BuildContext, provided by the BuildContextExension extension

Get Named Route arguments
no setter
height double

Available on BuildContext, provided by the BuildContextExension extension

return screen height
no setter
iconColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns dividerColor Color
no setter
isAndroid bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is Android.
no setter
isFuchsia bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is Fuchsia.
no setter
isIOS bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is iOS.
no setter
isLandscape bool

Available on BuildContext, provided by the BuildContextExension extension

This will return Orientation object and you can check is the landscape
no setter
isLinux bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is Linux.
no setter
isMacOS bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is macOS.
no setter
isPortrait bool

Available on BuildContext, provided by the BuildContextExension extension

This will return Orientation object and you can check is the portrait
no setter
isWeb bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is Linux.
no setter
isWindows bool

Available on BuildContext, provided by the BuildContextExension extension

Returns true if the current platform is Windows.
no setter
maxScreenSize double

Available on BuildContext, provided by the BuildContextExension extension

Returns the maximum screen size (width or height).
no setter
minScreenSize double

Available on BuildContext, provided by the BuildContextExension extension

Returns the minimum screen size (width or height).
no setter

Available on BuildContext, provided by the BuildContextExension extension

Return the height of navigation bar
no setter
orientation Orientation

Available on BuildContext, provided by the BuildContextExension extension

no setter
overlayState OverlayState?

Available on BuildContext, provided by the BuildContextExension extension

Returns Overlay.of(context)
no setter
pixelRatio double

Available on BuildContext, provided by the BuildContextExension extension

return screen devicePixelRatio
no setter
platform TargetPlatform

Available on BuildContext, provided by the BuildContextExension extension

Returns the current platform.
no setter
platformBrightness Brightness

Available on BuildContext, provided by the BuildContextExension extension

returns brightness
no setter
primaryColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns primaryColor Color
no setter
scaffoldBackgroundColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns scaffoldBackgroundColor Color
no setter
scaffoldState ScaffoldState?

Available on BuildContext, provided by the BuildContextExension extension

Returns Scaffold.of(context)
no setter
secondaryColor Color

Available on BuildContext, provided by the BuildContextExension extension

Returns secondaryColor Color
no setter
size Size

Available on BuildContext, provided by the BuildContextExension extension

Returns the screen size.
no setter
statusBarHeight double

Available on BuildContext, provided by the BuildContextExension extension

Return the height of status bar
no setter
textTheme TextTheme

Available on BuildContext, provided by the BuildContextExension extension

Returns Theme.of(context).textTheme
no setter
theme ThemeData

Available on BuildContext, provided by the BuildContextExension extension

Returns Theme.of(context)
no setter
width double

Available on BuildContext, provided by the BuildContextExension extension

return screen width
no setter

Methods

clearSnackBars() → void

Available on BuildContext, provided by the BuildContextExension extension

? remove all SnackBar from build context
hideCurrentSnackBar() → void

Available on BuildContext, provided by the BuildContextExension extension

? hide current SnackBar from build context
openDrawer() → void

Available on BuildContext, provided by the BuildContextExension extension

To open the drawer, use either ScaffoldState.openDrawer
openEndDrawer() → void

Available on BuildContext, provided by the BuildContextExension extension

To close the drawer, use either ScaffoldState.closeEndDrawer or Navigator.pop.
pop<T extends Object>([T? result]) → void

Available on BuildContext, provided by the BuildContextExension extension

The type of result, if provided, must match the type argument of the class of the popped route (T).
removeCurrentSnackBar() → void

Available on BuildContext, provided by the BuildContextExension extension

? remove current SnackBar from build context
requestFocus(FocusNode focus) → void

Available on BuildContext, provided by the BuildContextExension extension

Request focus to given FocusNode
showSnackBar({Key? key, Color? backgroundColor, double? elevation, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? width, HitTestBehavior? hitTestBehavior, SnackBarBehavior? behavior = SnackBarBehavior.floating, SnackBarAction? action, double? actionOverflowThreshold, bool? showCloseIcon, Color? closeIconColor, Animation<double>? animation, void onVisible()?, DismissDirection dismissDirection = DismissDirection.down, Clip clipBehavior = Clip.hardEdge, Duration duration = const Duration(seconds: 4), TextStyle? style, TextDirection? direction, BorderRadius? borderRadius, double horizontalPadding = 16, double verticalPadding = 8, Widget? leading, double leadingPadding = 4, Widget? title, Widget? description, Widget? trailing, double trailingPadding = 4}) → void

Available on BuildContext, provided by the BuildContextExension extension

? Show SnackBar from build context
unFocus(FocusNode focus) → void

Available on BuildContext, provided by the BuildContextExension extension

Request focus to given FocusNode
unFocusKeyboard() → void

Available on BuildContext, provided by the BuildContextExension extension

Hide Keyboard