gaj_model/gaj_model_util library


This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via Static methods on this class are also used in message formatting.
Used primarily for currency formatting, this number-like class stores millionths of a currency unit, typically as an Int64.
Provides the ability to format a number in a locale-specific way.
Represents directionality of text.
A fixed-length list of 8-bit unsigned integers.


cachedUserLocation LatLng?
getter/setter pair
getCurrentTimestamp DateTime
no setter
isAndroid bool
no setter
isiOS bool
no setter
isWeb bool
no setter


colorFromCssString(String color, {Color? defaultColor}) Color
dateTimeFormat(String format, DateTime? dateTime, {String? locale}) String
dateTimeFromSecondsSinceEpoch(int seconds) DateTime
formatNumber(num? value, {required FormatType formatType, DecimalType? decimalType, String? currency, bool toLowerCase = false, String? format, String? locale}) String
getCurrentUserLocation({required LatLng defaultLocation, bool cached = false}) Future<LatLng>
getJsonField(dynamic response, String jsonPath, [bool isForList = false]) → dynamic
getWidgetBoundingBox(BuildContext context) Rect?
isMobileWidth(BuildContext context) bool
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
launchURL(String url) Future
max<T extends num>(T a, T b) → T
Returns the larger of two numbers.
min<T extends num>(T a, T b) → T
Returns the lesser of two numbers.
queryCurrentUserLocation() Future<LatLng?>
responsiveVisibility({required BuildContext context, bool phone = true, bool tablet = true, bool tabletLandscape = true, bool desktop = true}) bool
showSnackbar(BuildContext context, String message, {bool loading = false, int duration = 4}) → void
toBeginningOfSentenceCase(String? input, [String? locale]) String?
Convert a string to beginning of sentence case, in a way appropriate to the locale.
valueOrDefault<T>(T? value, T defaultValue) → T