BuildContextExension extension

on

Properties

accentColor Color
Returns accentColor Color
no setter
canPop bool
Route.isFirst, which returns true for routes for which canPop returns false.
no setter
cardColor Color
Returns cardColor Color
no setter
defaultTextStyle DefaultTextStyle
Returns DefaultTextStyle.of(context)
no setter
dividerColor Color
Returns dividerColor Color
no setter
formState FormState?
Returns Form.of(context)
no setter
getArguments → dynamic
Get Named Route arguments
no setter
height double
return screen height
no setter
iconColor Color
Returns dividerColor Color
no setter
isAndroid bool
Returns true if the current platform is Android.
no setter
isFuchsia bool
Returns true if the current platform is Fuchsia.
no setter
isIOS bool
Returns true if the current platform is iOS.
no setter
isLandscape bool
This will return Orientation object and you can check is the landscape
no setter
isLinux bool
Returns true if the current platform is Linux.
no setter
isMacOS bool
Returns true if the current platform is macOS.
no setter
isPortrait bool
This will return Orientation object and you can check is the portrait
no setter
isWeb bool
Returns true if the current platform is Linux.
no setter
isWindows bool
Returns true if the current platform is Windows.
no setter
maxScreenSize double
Returns the maximum screen size (width or height).
no setter
minScreenSize double
Returns the minimum screen size (width or height).
no setter
Return the height of navigation bar
no setter
orientation Orientation
no setter
overlayState OverlayState?
Returns Overlay.of(context)
no setter
pixelRatio double
return screen devicePixelRatio
no setter
platform TargetPlatform
Returns the current platform.
no setter
platformBrightness Brightness
returns brightness
no setter
primaryColor Color
Returns primaryColor Color
no setter
scaffoldBackgroundColor Color
Returns scaffoldBackgroundColor Color
no setter
scaffoldState ScaffoldState?
Returns Scaffold.of(context)
no setter
secondaryColor Color
Returns secondaryColor Color
no setter
size Size
Returns the screen size.
no setter
statusBarHeight double
Return the height of status bar
no setter
textTheme TextTheme
Returns Theme.of(context).textTheme
no setter
theme ThemeData
Returns Theme.of(context)
no setter
width double
return screen width
no setter

Methods

clearSnackBars() → void
? remove all SnackBar from build context
hideCurrentSnackBar() → void
? hide current SnackBar from build context
openDrawer() → void
To open the drawer, use either ScaffoldState.openDrawer
openEndDrawer() → void
To close the drawer, use either ScaffoldState.closeEndDrawer or Navigator.pop.
pop<T extends Object>([T? result]) → void
The type of result, if provided, must match the type argument of the class of the popped route (T).
removeCurrentSnackBar() → void
? remove current SnackBar from build context
requestFocus(FocusNode focus) → void
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
? Show SnackBar from build context
unFocus(FocusNode focus) → void
Request focus to given FocusNode
unFocusKeyboard() → void
Hide Keyboard