UserSwitchStrategy enum
Defines the strategy to use when switching between users.
Values
- syncThenSwitch → const UserSwitchStrategy
-
Before switching to the new user, fully synchronize any pending local changes for the old user. This is the safest default.
- clearAndFetch → const UserSwitchStrategy
-
When switching to the new user, clear all of their existing local data and then perform a full sync to fetch fresh data from the remote. Useful for ensuring a clean state.
- promptIfUnsyncedData → const UserSwitchStrategy
-
If the old user has any unsynced local changes, the switch operation will fail and return an error. This forces the user or application to resolve pending data before proceeding.
- keepLocal → const UserSwitchStrategy
-
Switch to the new user without modifying any local data for either the old or new user. Local data is kept as-is.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
UserSwitchStrategy> - A constant List of the values in this enum, in order of their declaration.