NormalizedState<T> class
Normalized state structure for managing collections
Constructors
Properties
- count → int
-
Get count
no setter
-
entities
→ Map<
String, T> -
Get all entities
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ids
→ Set<
String> -
Get all IDs
no setter
- isEmpty → bool
-
Check if empty
no setter
- isNotEmpty → bool
-
Check if not empty
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clear all entities
-
contains(
String id) → bool - Check if entity exists
-
getById(
String id) → T? - Get entity by ID
-
getByIds(
List< String> ids) → List<T> - Get multiple entities by IDs
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String id) → void - Remove entity
-
removeMany(
List< String> ids) → void - Remove multiple entities
-
toString(
) → String -
A string representation of this object.
inherited
-
upsert(
String id, T entity) → void - Add or update entity
-
upsertMany(
Map< String, T> entities) → void - Add or update multiple entities
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited