utils
library
Functions
-
degToRad(num deg)
→ double
-
-
equalsWithinEpsilon(double a, double b)
→ bool
-
-
getWebUrl()
→ String?
-
Gets the URL from the browser.
-
isPrivateMember(String member)
→ bool
-
-
launchUrl(String url, {void onError()?})
→ Future<void>
-
Launches
url
in the browser.
-
loadQueryParams()
→ Map<String, String>
-
-
parseCssHexColor(String input)
→ Color
-
Parses a 3 or 6 digit CSS Hex Color into a dart:ui Color.
-
pluralize(String word, int count, {String? plural})
→ String
-
Pluralizes a word, following english rules (1, many).
-
removeGlobal(Type clazz)
→ void
-
-
setGlobal(Type clazz, Object instance)
→ void
-
-
sortFieldsByName(String a, String b)
→ int
-
Public properties first, then sort alphabetically
-
toCssHexColor(Color color)
→ String
-
Converts a dart:ui Color into #RRGGBBAA format for use in CSS.
-
updateQueryParameter(String key, String? value, {bool reload = false})
→ void
-
Updates the query parameter with
key
to the new value
, and optionally
reloads the page when reload
is true.
-
webRedirect(String url)
→ void
-
Performs a web redirect using window.location.replace().
-
whenValueNonNull<T>(ValueListenable<T> listenable, {Duration? timeout})
→ Future<T>
-