default provider
This commit is contained in:
@@ -247,4 +247,13 @@ class SessionCubit extends Cubit<SessionState> {
|
||||
void setIsSingleUserMode(bool isSingleUser) {
|
||||
emit(state.copyWith(isSingleUserMode: isSingleUser));
|
||||
}
|
||||
|
||||
void updateCurrentStoreLocally(StoreModel updatedStore) {
|
||||
// Verifichiamo che l'utente stia effettivamente lavorando nel negozio appena modificato
|
||||
if (state.currentStore != null &&
|
||||
state.currentStore!.id == updatedStore.id) {
|
||||
// Emettiamo il nuovo stato sovrascrivendo solo il negozio corrente
|
||||
emit(state.copyWith(currentStore: updatedStore));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user