finished tracking. But not tested enough yet
time
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:fforte/l10n/app_localizations.dart';
|
||||
import 'package:fforte/screens/sharedMethods/delete_main_entries.dart';
|
||||
import 'package:fforte/screens/sharedMethods/delete_templates.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
|
||||
class ViewEntriesDialogHelper {
|
||||
static void deleteAllMainEntries(
|
||||
@@ -43,32 +44,41 @@ class ViewEntriesDialogHelper {
|
||||
);
|
||||
}
|
||||
|
||||
static void deleteAllTemplates(BuildContext context, DatabasesEnum dbType) async{
|
||||
static void deleteAllTemplates(
|
||||
BuildContext context,
|
||||
DatabasesEnum dbType,
|
||||
) async {
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text(AppLocalizations.of(context)!.deleteEverything),
|
||||
content: SingleChildScrollView(
|
||||
child: ListBody(children: <Widget>[
|
||||
Text(AppLocalizations.of(context)!.deleteEverythingContent)
|
||||
]),
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text(AppLocalizations.of(context)!.deleteEverything),
|
||||
content: SingleChildScrollView(
|
||||
child: ListBody(
|
||||
children: <Widget>[
|
||||
Text(AppLocalizations.of(context)!.deleteEverythingContent),
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
DeleteTemplates.deleteAll(dbType);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.deleteEverything)),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.cancel))
|
||||
],
|
||||
);
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.deleteEverything),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.cancel),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user