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