ContextExtensions extension

Extensions for adding additional functionality to the BuildContext.

on

Properties

isDarkMode bool
Indicates whether the app is in dark mode
no setter
isLightMode bool
Indicates whether the app is in light mode
no setter
screenHeight double
Get 100 percent of Height of a screen
no setter
screenWidth double
Get 100 percent of Width of a screen
no setter

Methods

h(double height) double
Get X percent of Height of a screen
showAlertDialog({required String title, required String message, List<String>? positiveButtonsTitle, String? cancelButtonTitle, dynamic onDone(int)?, Color? positiveTitleColor, Color? cancelTitleColor, double? fontSize, bool barrierDismissible = true}) → void
Displays an alert dialog based on the platform (iOS or Android).
w(double width) double
Get X percent of Width of a screen