freezed_annotation library

Classes

CanonicalizedMap<C, K, V>
A map whose keys are converted to canonical values of type C. [...]
CaseInsensitiveEquality
String equality that's insensitive to differences in ASCII case. [...]
CombinedIterableView<T>
A view of several iterables combined sequentially into a single iterable. [...]
CombinedListView<T>
A view of several lists combined into a single list. [...]
CombinedMapView<K, V>
Returns a new map that represents maps flattened into a single map. [...]
DeepCollectionEquality
Deep equality on collections. [...]
Default
Allows passing default values to a constructor: [...]
DefaultEquality<E>
Equality of objects that compares only the natural equality of the objects. [...]
DelegatingIterable<E>
An Iterable that delegates all operations to a base iterable. [...]
DelegatingList<E>
A List that delegates all operations to a base list. [...]
DelegatingMap<K, V>
A Map that delegates all operations to a base map. [...]
DelegatingQueue<E>
A Queue that delegates all operations to a base queue. [...]
DelegatingSet<E>
A Set that delegates all operations to a base set. [...]
Equality<E>
A generic equality relation on objects.
EqualityBy<E, F>
Equality of objects based on derived values. [...]
EqualityMap<K, V>
A Map whose key equality is determined by an Equality object.
EqualitySet<E>
A Set whose key equality is determined by an Equality object.
Freezed
HeapPriorityQueue<E>
Heap based priority queue. [...]
IdentityEquality<E>
Equality of objects that compares only the identity of the objects.
Immutable
Used to annotate a class. [...]
Implements
Marks a union type to implement the interface type or stringType. In the case below City will implement GeographicArea. [...]
IterableEquality<E>
Equality on iterables. [...]
IterableZip<T>
Iterable that iterates over lists of values from other iterables. [...]
JsonConverter<T, S>
Implement this class to provide custom converters for a specific Type. [...]
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.
ListEquality<E>
Equality on lists. [...]
ListSlice<E>
A list view of a range of another list. [...]
MapEquality<K, V>
Equality on maps. [...]
MapKeySet<E>
An unmodifiable Set view of the keys of a Map. [...]
MapValueSet<K, V>
Creates a modifiable Set view of the values of a Map. [...]
MultiEquality<E>
Combines several equalities into a single equality. [...]
NonGrowableListMixin<E>
Mixin class that implements a throwing version of all list operations that change the List's length.
NonGrowableListView<E>
A fixed-length list. [...]
PriorityQueue<E>
A priority queue is a priority based work-list of elements. [...]
QueueList<E>
A class that efficiently implements both Queue and List.
Required
Used to annotate a named parameter p in a method or function f. [...]
SetEquality<E>
Equality of sets. [...]
UnionSet<E>
A single set that provides a view of the union over a set of sets. [...]
UnionSetController<E>
A controller that exposes a view of the union of a collection of sets. [...]
UnmodifiableListView<E>
An unmodifiable List view of another List. [...]
UnmodifiableMapMixin<K, V>
Mixin class that implements a throwing version of all map operations that change the Map.
UnmodifiableMapView<K, V>
View of a Map that disallow modifying the map. [...]
UnmodifiableSetMixin<E>
Mixin class that implements a throwing version of all set operations that change the Set.
UnmodifiableSetView<E>
An unmodifiable set. [...]
UnorderedIterableEquality<E>
Equality of the elements of two iterables without considering order. [...]
UseResult
See useResult for more details.
With
Marks a union type to mixin the class type or stringType. In the case below City will mixin with GeographicArea. [...]

Extensions

ComparatorExtension
Extensions on comparator functions.
IterableComparableExtension
Extensions that apply to iterables of Comparable elements. [...]
IterableDoubleExtension
Extension on iterables of double. [...]
IterableExtension
Extensions that apply to all iterables. [...]
IterableIntegerExtension
Extension on iterables of integers. [...]
IterableIterableExtension
Extensions on iterables whose elements are also iterables.
IterableNullableExtension
Extensions that apply to iterables with a nullable element type.
IterableNumberExtension
Extensions that apply to iterables of numbers.
ListComparableExtensions
Various extensions on lists of comparable elements.
ListExtensions
Various extensions on lists of arbitrary elements.

Constants

alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritance, are also expected to conform to this contract. [...]
_AlwaysThrows()
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method. [...]
@Deprecated('Use the `covariant` modifier instead')
_Checked()
doNotStore → const _DoNotStore
Used to annotate a method, getter or top-level getter or function to indicate that the value obtained by invoking it should not be stored in a field or top-level variable. The annotation can also be applied to a class to implicitly annotate all of the valid members of the class, or applied to a library to annotate all of the valid members of the library, including classes. If a value returned by an element marked as doNotStore is returned from a function or getter, that function or getter should be similarly annotated. [...]
_DoNotStore()
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change. [...]
_Experimental()
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation. [...]
_Factory()
freezed → const Freezed
An annotation for the freezed package. [...]
Freezed._()
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable. [...]
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API. [...]
_Internal()
isTest → const _IsTest
Used to annotate a test framework function that runs a single test. [...]
_IsTest()
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests. [...]
_IsTestGroup()
late → const _Late
Mark a getter as safe to cache. [...]
_Late._()
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant. [...]
_Literal()
mustCallSuper → const _MustCallSuper
Used to annotate an instance method m. Indicates that every invocation of a method that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation. [...]
_MustCallSuper()
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M. [...]
_NonVirtual()
nullable → const _Nullable
Mark the generated property as nullable. [...]
_Nullable._()
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, extension, function, method, or typedef declaration C. Indicates that any type arguments declared on C are to be treated as optional. [...]
_OptionalTypeArgs()
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes. [...]
_Protected()
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter. [...]
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type. [...]
_Sealed()
useResult → const UseResult
Used to annotate a method, field, or getter within a class, mixin, or extension, or a or top-level getter, variable or function to indicate that the value obtained by invoking it should be use. A value is considered used if it is assigned to a variable, passed to a function, or used as the target of an invocation, or invoked (if the result is itself a function). [...]
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode. [...]
@Deprecated('No longer has meaning')
_Virtual()
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library. [...]
_VisibleForOverriding()
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable. [...]
_VisibleForTesting()

Functions

$checkedConvert<T>(Map map, String key, T castFunc(Object)) → 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. [...]
binarySearch<E>(List<E> sortedList, E value, {int compare(E, E)}) int
Returns a position of the value in sortedList, if it is there. [...]
compareAsciiLowerCase(String a, String b) int
Compares a and b lexically, converting ASCII letters to lower case. [...]
compareAsciiLowerCaseNatural(String a, String b) int
Compares strings a and b according to lower-case natural sort ordering. [...]
compareAsciiUpperCase(String a, String b) int
Compares a and b lexically, converting ASCII letters to upper case. [...]
compareAsciiUpperCaseNatural(String a, String b) int
Compares strings a and b according to upper-case natural sort ordering. [...]
compareNatural(String a, String b) int
Compares strings a and b according to natural sort ordering. [...]
equalsIgnoreAsciiCase(String a, String b) bool
Checks if strings a and b differ only on the case of ASCII letters. [...]
groupBy<S, T>(Iterable<S> values, T key(S)) Map<T, List<S>>
Groups the elements in values by the value returned by key. [...]
hashIgnoreAsciiCase(String string) int
Hash code for a string which is compatible with equalsIgnoreAsciiCase. [...]
insertionSort<E>(List<E> elements, {int compare(E, E), int start = 0, int end}) → void
Sort a list between start (inclusive) and end (exclusive) using insertion sort. [...]
lowerBound<E>(List<E> sortedList, E value, {int compare(E, E)}) int
Returns the first position in sortedList that does not compare less than value. [...]
mapMap<K1, V1, K2, V2>(Map<K1, V1> map, {K2 key(K1, V1), V2 value(K1, V1)}) Map<K2, V2>
Creates a new map from map with new keys and values. [...]
@Deprecated('Use Map.map or a for loop in a Map literal.')
maxBy<S, T>(Iterable<S> values, T orderBy(S), {int compare(T, T)}) → S
Returns the element of values for which orderBy returns the maximum value. [...]
mergeMaps<K, V>(Map<K, V> map1, Map<K, V> map2, {V value(V, V)}) Map<K, V>
Returns a new map with all key/value pairs in both map1 and map2. [...]
mergeSort<E>(List<E> elements, {int start = 0, int end, int compare(E, E)}) → void
Sorts a list between start (inclusive) and end (exclusive) using the merge sort algorithm. [...]
minBy<S, T>(Iterable<S> values, T orderBy(S), {int compare(T, T)}) → S
Returns the element of values for which orderBy returns the minimum value. [...]
reverse<E>(List<E> elements, [int start = 0, int end]) → void
Reverses a list, or a part of a list, in-place.
shuffle(List elements, [int start = 0, int end, Random random]) → void
Shuffles a list randomly. [...]
stronglyConnectedComponents<T>(Map<T, Iterable<T>> graph) List<Set<T>>
Returns the strongly connected components of graph, in topological order. [...]
transitiveClosure<T>(Map<T, Iterable<T>> graph) Map<T, Set<T>>
Returns the transitive closure of graph. [...]

Enums

FieldRename
Values for the automatic field renaming behavior for JsonSerializable.

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.
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.