utils/library library

Imports

Constants

maxInt64 → const int
Library Utilities

Functions

cast<T>(Object input) → T
Casts input as type T.
check(bool condition, [Object? message]) → void
Asserts that condition is true.
checkEq(int value, int limit, [Object? label]) → void
Asserts that value is equal to limit.
checkGt(int value, int limit, [Object? label]) → void
Asserts that value is greater than limit.
checkGte(int value, int limit, [Object? label]) → void
Asserts that value is greater than or equal to limit.
checkLt(int value, int limit, [Object? label]) → void
Asserts that value is less than limit.
checkLte(int value, int limit, [Object? label]) → void
Asserts that value is less than or equal to limit.
checkThrow(bool condition, Object callback()) → void
Asserts that condition is true.
tryCall<T>(T callback()) → T?
Calls a callback function and returns its value.
tryParse<T, U>(dynamic input, JsonRpcParser<T, U> parse) → T?
Calls parse(input) and returns its result.
tryParseDuration({required int? milliseconds}) Duration?
Creates a Duration of milliseconds.