feat-add-files-from-qr (#8)

Reviewed-on: http://catelliub.zapto.org:3000/brontomark/flux/pulls/8
Co-authored-by: Mark M2 Macbook <marco@catelli.it>
Co-committed-by: Mark M2 Macbook <marco@catelli.it>
This commit is contained in:
2026-04-26 10:15:34 +02:00
committed by brontomark
parent 90bd5ecacf
commit 1c2bcf9df7
46 changed files with 2376 additions and 327 deletions

View File

@@ -57,7 +57,7 @@ class ProvidersCubit extends Cubit<ProvidersState> {
ProvidersCubit() : super(const ProvidersState());
// Carica i provider della company e quelli associati a uno store specifico
Future<void> loadProviders(StoreModel? store) async {
Future<void> loadProviders({StoreModel? store}) async {
emit(state.copyWith(isLoading: true));
try {
final all = await _repository.fetchAllCompanyProviders(
@@ -149,7 +149,7 @@ class ProvidersCubit extends Cubit<ProvidersState> {
await _repository.syncProviderStores(pId!, selectedStoreIds);
// 3. Ricarichiamo tutto
await loadProviders(null);
await loadProviders();
} catch (e) {
emit(state.copyWith(isLoading: false, errorMessage: e.toString()));
}
@@ -168,7 +168,7 @@ class ProvidersCubit extends Cubit<ProvidersState> {
// o fare un confronto tra i presenti e i nuovi)
await _repository.syncProviderStores(provider.id!, storeIds);
await loadProviders(null);
await loadProviders();
} catch (e) {
emit(state.copyWith(isLoading: false, errorMessage: e.toString()));
}