From 76d93ab7829c248f63cbf94e5fe854eb2aa90286 Mon Sep 17 00:00:00 2001 From: def Date: Thu, 18 Jan 2024 15:31:07 +0200 Subject: [PATCH] fix: missclicked on "Approve" button --- .../setup/initializing/domain_picker.dart | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/ui/pages/setup/initializing/domain_picker.dart b/lib/ui/pages/setup/initializing/domain_picker.dart index f9bb83d9..1d60ce74 100644 --- a/lib/ui/pages/setup/initializing/domain_picker.dart +++ b/lib/ui/pages/setup/initializing/domain_picker.dart @@ -132,10 +132,38 @@ class _DomainPickerState extends State { overflow: TextOverflow.ellipsis, maxLines: 1, ), - ), + ) ], ), ], + if (state is Empty) ...[ + const SizedBox(height: 30), + BrandButton.filled( + onPressed: () => context.read().load(), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Icons.refresh, + color: Colors.white, + ), + const SizedBox(width: 10), + Text( + 'domain.update_list'.tr(), + style: Theme.of(context).textTheme.bodyLarge, + ), + ], + ), + ), + ], + if (state is Loaded) ...[ + const SizedBox(height: 32), + BrandButton.filled( + onPressed: () => + context.read().saveDomain(state.domain), + text: 'initializing.save_domain'.tr(), + ), + ], ], ), );