utils/utils library

Classes

Height
A custom Flutter widget that creates a vertical spacer or divider with a fixed width and variable height. Useful for creating empty space between other widgets or dividing content vertically.
Width
A custom Flutter widget that creates a horizontal spacer or divider with a fixed height and variable width. Useful for creating empty space between other widgets or dividing content horizontally.

Extensions

MQ on BuildContext

Properties

globalContext BuildContext?
This is global build context which can be used outside of an Sateless and Stateful Widget
final
globalKey GlobalKey<NavigatorState>
Need to pass it in the MaterialApp of your Sort Form of
final

Functions

getJson(dynamic jsonObject, {dynamic name}) String
A Dart function that takes a JSON-serializable object and returns a formatted JSON string. The function also logs the formatted JSON string to the console with an optional label.
loading({required bool value, String? title = "Loading..", bool closeOverlays = false}) → void
IMP: Before using this method you need to pass EasyLoading.init() in the material app
pop<T>(BuildContext context, {T? result}) → void
A Dart function that pops the current route off the navigation stack and returns an optional result.
popTill<T>(BuildContext context, int count, {T? result}) → void
A Dart function that pops the current route off the navigation stack a specified number of times.
popToFirst(BuildContext context) → void
Pop to first screen of the navigator stack
push<T>({required BuildContext context, required Widget screen, bool pushUntil = false}) Future<T?>
A Dart function that pushes a new route onto the navigation stack, displaying the specified screen widget.
radius(double radius) BorderRadius
A Dart function that creates a new circular BorderRadius object with the given radius value.
unFocus(BuildContext context) → void
A utility function that unfocuses the currently focused text input field in the given BuildContext.