mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-11-16 01:07:07 +01:00
add trap for potential async context issue found by linter
This commit is contained in:
1 parent
c787589205
commit
0c6cf467fe
1 file changed
+1
@@ -25,6 +25,7 @@ class EnableOfflineFeaturesSection extends StatelessWidget {
|
||||
// no "cancel" path once this dialog is shown.
|
||||
final offlineService = OfflineAreaService();
|
||||
await offlineService.ensureInitialized();
|
||||
if (!context.mounted) return;
|
||||
final hasExistingAreas = offlineService.offlineAreas.isNotEmpty;
|
||||
|
||||
if (!hasExistingAreas) {
|
||||
|
||||
Reference in new issue
Block a user