Skip to content

Commit f50d356

Browse files
authored
Merge pull request #17 from arran4/codex/fix-unawaited-futures-warning-in-settings
Handle unawaited navigation in settings
2 parents dbc7622 + 87fe943 commit f50d356

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/settings.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:async';
2+
13
import 'package:flutter/material.dart';
24
import 'package:flutter_google_datastore/main.dart';
35
import 'package:settings_ui/settings_ui.dart';
@@ -39,9 +41,11 @@ class SettingsWidgetState extends State<SettingsWidget> {
3941
title: const Text('Delete Database'),
4042
description: Text("SQLFile: $fp"),
4143
onPressed: (BuildContext context) {
42-
Navigator.of(context).push(
43-
MaterialPageRoute(
44-
builder: (context) => const DeleteDatabaseScreen(),
44+
unawaited(
45+
Navigator.of(context).push(
46+
MaterialPageRoute(
47+
builder: (context) => const DeleteDatabaseScreen(),
48+
),
4549
),
4650
);
4751
},

0 commit comments

Comments
 (0)