Skip to content

Commit 73269af

Browse files
committed
fix(ui): provider access after widget disposed
1 parent 2c81a67 commit 73269af

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/pages/shopinbit/shopinbit_settings_view.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ class _ShopInBitSettingsViewState extends ConsumerState<ShopInBitSettingsView> {
5454
.read(pSharedDrift)
5555
.shopinBitSettingsDao
5656
.getSettings();
57-
final key = await ref.read(pShopinBitService).loadCustomerKey();
5857
if (mounted) {
59-
setState(() {
60-
_currentKey = key;
61-
_displayNameController.text = settings.displayName ?? "";
62-
});
58+
final key = await ref.read(pShopinBitService).loadCustomerKey();
59+
if (mounted) {
60+
setState(() {
61+
_currentKey = key;
62+
_displayNameController.text = settings.displayName ?? "";
63+
});
64+
}
6365
}
6466
}();
6567
}

0 commit comments

Comments
 (0)