stampa ddt
This commit is contained in:
@@ -60,7 +60,13 @@ class _ProviderListScreenState extends State<ProviderListScreen> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Gestione Fornitori')),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () => context.pushNamed(Routes.providerForm),
|
||||
onPressed: () async {
|
||||
final providerListCubit = context.read<ProviderListCubit>();
|
||||
final storeId = context.read<SessionCubit>().state.currentStore?.id;
|
||||
await context.pushNamed(Routes.providerForm);
|
||||
if (!mounted || storeId == null) return;
|
||||
providerListCubit.loadProviders(storeId);
|
||||
},
|
||||
icon: const Icon(Icons.add),
|
||||
label: const Text('Nuovo Fornitore'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user