commons
library
Classes
Assert
A decorator that allows adding assert(...) on the generated classes.
BehaviorSubjectRxVar <T >
BiDi <A , B >
Cache <K , V >
CachedFr <T , K , C , F extends Fr <T > >
CachedFu <T , K , C , F extends Fw <T > >
Compose
DeepCollectionEquality
Deep equality on collections.
Default
Allows passing default values to a constructor:
Disposable
DspImpl
DspReg
EqualUnmodifiableListView <T >
An UnmodifiableListView which overrides ==
EqualUnmodifiableMapView <Key , Value >
An UnmodifiableMapView which overrides ==
EqualUnmodifiableSetView <T >
An UnmodifiableSetView which overrides ==
FileStore
Fr <T >
Freezed
Flags a class as needing to be processed by Freezed and allows passing options.
FreezedMapOptions
Options for enabling/disabling specific Union.map features;
FreezedUnionValue
An annotation used to specify how a union type will be serialized.
FreezedWhenOptions
Options for enabling/disabling specific Union.when features;
Fu <T >
Futures
Fw <T >
Has
HasDefault
HasMfw <M extends GeneratedMessage >
HasName
HasPayload <T >
HasThisType
Immutable
Annotation on an immutable class.
Implements <T extends Object ? >
Marks a union type to implement the interface stringType or type T.
In the case below City will implement AdministrativeArea<House>.
IndexedParentReference <P >
JsonConverter <T , S >
Implement this class to provide custom converters for a specific Type .
JsonEnum
Allows configuration of how enum elements are treated as JSON.
JsonKey
An annotation used to specify how a field is serialized.
JsonLiteral
An annotation used to generate a private field containing the contents of a
JSON file.
JsonSerializable
An annotation used to specify a class to generate code for.
JsonValue
An annotation used to specify how a enum value is serialized.
Late <T >
LatestExecutor <T extends Object >
Locker <T >
MhuLogger
ParseFailure <T >
ParseResult <T >
ParseSuccess <T >
PbIntMapKey
PbMapKey
PbStringMapKey
RecordUse
Annotation on static method or class whose accesses will be recorded.
RefCountPool <K , V >
Required
Annotation on a required named parameter.
RxVal <T >
RxVar <T >
SetDiff <T >
SingleElementIterable <E >
TaskQueue
TypedCache
TypedKey <T >
UseResult
Annotation on function or property whose value must not be ignored.
With <T extends Object ? >
Marks a union type to mixin the interface stringType or type T.
In the case below City will mixin with AdministrativeArea<House>.
Constants
alwaysThrows
→ const Object
Annotation marking a function as always throwing.
awaitNotRequired
→ const Object
Annotation on asynchronous function whose Future can be ignored.
checked
→ const Object
Annotation that no longer has any effect.
doNotStore
→ const Object
Annotation on function or property whose value must not be stored.
doNotSubmit
→ const Object
Annotation marking declaration that should be removed before publishing.
experimental
→ const Object
Annotation marking declaration as experimental and subject to change.
factory
→ const Object
Annotation on a function that creates new objects.
freezed
→ const Freezed
freezedStruct
→ const Freezed
immutable
→ const Immutable
Annotation on an immutable class.
internal
→ const Object
Annotation on declaration that should not be used outside of its package.
isTest
→ const Object
Annotation on a test framework function that introduces a single test.
isTestGroup
→ const Object
Annotation on a test framework function that introduces a group of tests.
literal
→ const Object
Annotation on constructor that must be invoked with const if possible.
mustBeConst
→ const Object
Annotation on a parameter whose arguments must be constants.
mustBeOverridden
→ const Object
Annotation on instance members that must be overridden by subclasses.
mustCallSuper
→ const Object
Annotation on instance member that overriding members must call.
nonVirtual
→ const Object
Annotation on instance member that must not be overridden.
optionalTypeArgs
→ const Object
Annotation on type arguments that can safely be omitted.
protected
→ const Object
Annotation on instance member that should only be used by subclasses.
redeclare
→ const Object
Annotation on extension type members which redeclare superinterface members.
reopen
→ const Object
Annotation on declaration with less access restrictions than superinterface.
required
→ const Required
Annotation on named parameter that should always have an argument supplied.
sealed
→ const Object
Annotation on class that must not be subclassed outside of its package.
unfreezed
→ const Freezed
Defines a potentially mutable data-class.
useResult
→ const UseResult
Annotation on function or property whose value must not be ignored.
virtual
→ const Object
Annotation which no longer has any effect.
visibleForOverriding
→ const Object
Annotation on declaration that should not be used outside of its package.
visibleForTesting
→ const Object
Annotation on a public declaration that should only be used in tests.
Properties
logger
→ Logger
final
Functions
$checkedConvert <T > (Map map , String key , T castFunc (dynamic ), {Object ? readValue (Map , String )? })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkedCreate <T > (String className , Map map , T constructor (S <S >(String , S (Object ? ), {Object ? readValue (Map , String )? }) ), {Map <String , String > fieldKeyMap = const {} })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkedNew <T > (String className , Map map , T constructor (), {Map <String , String > ? fieldKeyMap })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkKeys (Map map , {List <String > ? allowedKeys , List <String > ? requiredKeys , List <String > ? disallowNullValues })
→ void
Helper function used in generated fromJson code when
JsonSerializable.disallowUnrecognizedKeys is true for an annotated type or
JsonKey.required is true for any annotated fields.
$enumDecode <K extends Enum , V > (Map <K , V > enumValues , Object ? source , {K? unknownValue })
→ K
Returns the key associated with value source from enumValues, if one
exists.
$enumDecodeNullable <K extends Enum , V > (Map <K , V > enumValues , Object ? source , {Enum ? unknownValue })
→ K?
Returns the key associated with value source from enumValues, if one
exists.
compare2 <T > (Comparator <T > c1 , Comparator <T > c2 )
→ Comparator <T >
compare3 <T > (Comparator <T > c1 , Comparator <T > c2 , Comparator <T > c3 )
→ Comparator <T >
compareByField <T , F extends Comparable <F > > (F fieldValue (T t ) )
→ Comparator <T >
compareByFieldNatural <T , F > (F fieldValue (T t ), {Comparator <F > comparator = compareNaturalOrder })
→ Comparator <T >
compareByFieldNum <T > (num fieldValue (T t ) )
→ Comparator <T >
compareMany <T > (Iterable <Comparator <T > > comparators )
→ Comparator <T >
compareNaturalOrder (dynamic a , dynamic b )
→ int
compareTo <C extends Comparable <C > > (C a , C b )
→ int
compareToNum (num a , num b )
→ int
constantFalse ()
→ bool
constrainOrNull <T extends num > (T input , T min , T max )
→ T?
createDoubleRoughlyEqual (double epsilon )
→ bool Function(double a , double b )
decimalParseFunction (String source )
→ ParseResult <Decimal >
doubleEqualWithin3Decimals (double a , double b )
→ bool
doubleParseFunction (String string )
→ ParseResult <double >
doubleRoughlyEqual (double a , double b , double epsilon )
→ bool
dtbRandomString ({int length = 20 , String chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890' })
→ String
empty0 <T > ()
→ Iterable <T >
empty1 <T > (dynamic p0 )
→ Iterable <T >
flcCachedFileLoader <K > ({required FileLoader <K > loader , required FileStore store , required FilePath pathProvider (K key ) })
→ FileLoader <K >
fr <T > (T calc (), {DspReg ? disposers })
→ Fr <T >
frDsp <T > (T calc (DspReg disposers ), {DspReg ? dsp })
→ Fr <T >
fru <M extends GeneratedMessage , F > (Fw <M > fw , F get (M m ), {DspReg ? disposers })
→ Fu <F >
frw <T > (Fr <T > fr , void set (T v ) )
→ Fw <T >
fw <T > (T value , {DspReg ? disposers })
→ Fw <T >
identity <T > (T value )
→ T
ignore1 (dynamic p0 )
→ void
infiniteSingleElementIterator <T > (T element )
→ Iterable <T >
int64ParseFunction (String string )
→ ParseResult <Int64 >
intCompare (int a , int b )
→ int
integers ({int from = 0 })
→ Iterable <int >
intParseFunction (String string )
→ ParseResult <int >
iterableCompare <E extends Comparable <E > > (Iterable <E > a , Iterable <E > b )
→ int
iterableCompareNaturalOrder <E > (Iterable <E > a , Iterable <E > b , {Comparator <E > comparator = compareNaturalOrder })
→ int
lazy <T > (T factory () )
→ Late <T >
max2 <T > (T a , T b , [Comparator <T > comparator = compareNaturalOrder ])
→ T
millisSinceEpochToDisplayString (double millisSinceEpoch )
→ String
min2 <T > (T a , T b , [Comparator <T > comparator = compareNaturalOrder ])
→ T
nextPowerOf2 (int value )
→ int
nullFirst <T extends Object > (Comparator <T > comparator )
→ Comparator <T? >
nullLast <T extends Object > (Comparator <T > comparator )
→ Comparator <T? >
reversedIntCompare (int a , int b )
→ int
run <T > (T fn () )
→ T
rxw <T > (T initial , {DspReg ? dsp })
→ RxVar <T >
throws0 ()
→ Never
throws1 (dynamic p0 )
→ Never
tryParseDecimal (String string )
→ Decimal?
Typedefs
AsyncFunction <T >
= Future <T > Function()
AsyncVoidFunction
= AsyncFunction <void >
BiDiOpt <A , B >
= BiDi <A? , B? >
DisposeAction
= FutureOr <void > Function()
FileLoader <K >
= Future <Uint8List > Function(K path )
FilePath
= IList<String >
FilePathProvider <K >
= FilePath Function(K key )
IntMapEntry <T >
= MapEntry <int , T >
Lazy <T >
= T Function()
ListFu <V >
= CachedFu <V , int , List <V > , Fw <V > >
MapFu <K , V >
= CachedFu <V , K , Map <K , V > , Fw <V > >
Mfw <M extends GeneratedMessage >
= Fw <M >
ParseFunction <T >
= ParseResult <T > Function(String string )
StringMapEntry <T >
= MapEntry <String , T >
TypeFunction <TF >
= R Function<R >(R fn <T extends TF >() )
Watch <T >
= T Function()
Watch1 <T , P1 >
= T Function(P1 p1 )
Exceptions / Errors
BadKeyException
A base class for exceptions thrown when decoding JSON.
CheckedFromJsonException
Exception thrown if there is a runtime exception in fromJson
code generated when JsonSerializableGenerator.checked is true
DisallowedNullValueException
Exception thrown if there are keys with disallowed null values in a JSON
map that was provided during deserialization.
MhuException
MissingRequiredKeysException
Exception thrown if there are missing required keys in a JSON map that was
provided during deserialization.
UnrecognizedKeysException
Exception thrown if there are unrecognized keys in a JSON map that was
provided during deserialization.