DataCollectionState<T> class
- Implementers
- Annotations
-
- @Freezed(copyWith: true, makeCollectionsUnmodifiable: true)
Constructors
-
DataCollectionState.initial({required Iterable<T> originalData, required Iterable<T> data, @Default(IMapConst({})) IMap<String, FilterAction<T>> filters, @Default(IMapConst({})) IMap<String, MatchAction<T>> matchers, SortAction<T>? sort})
-
const
factory
-
DataCollectionState.loading({required Iterable<T> originalData, required Iterable<T> data, required IMap<String, FilterAction<T>> filters, required IMap<String, MatchAction<T>> matchers, SortAction<T>? sort})
-
const
factory
-
DataCollectionState.updated({required Iterable<T> originalData, required Iterable<T> data, required IMap<String, FilterAction<T>> filters, required IMap<String, MatchAction<T>> matchers, SortAction<T>? sort})
-
const
factory
Methods
-
containsFilter(String key)
→ bool
-
-
containsMatcher(String key)
→ bool
-
-
map<TResult extends Object?>({required TResult initial(DataCollectionInitialState<T> value), required TResult loading(DataCollectionLoadingState<T> value), required TResult updated(DataCollectionUpdatedState<T> value)})
→ TResult
-
inherited
-
mapOrNull<TResult extends Object?>({TResult? initial(DataCollectionInitialState<T> value)?, TResult? loading(DataCollectionLoadingState<T> value)?, TResult? updated(DataCollectionUpdatedState<T> value)?})
→ TResult?
-
inherited
-
maybeMap<TResult extends Object?>({TResult initial(DataCollectionInitialState<T> value)?, TResult loading(DataCollectionLoadingState<T> value)?, TResult updated(DataCollectionUpdatedState<T> value)?, required TResult orElse()})
→ TResult
-
inherited
-
maybeWhen<TResult extends Object?>({TResult initial(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?, TResult loading(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?, TResult updated(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?, required TResult orElse()})
→ TResult
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
when<TResult extends Object?>({required TResult initial(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort), required TResult loading(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort), required TResult updated(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)})
→ TResult
-
inherited
-
whenOrNull<TResult extends Object?>({TResult? initial(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?, TResult? loading(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?, TResult? updated(Iterable<T> originalData, Iterable<T> data, IMap<String, FilterAction<T>> filters, IMap<String, MatchAction<T>> matchers, SortAction<T>? sort)?})
→ TResult?
-
inherited