added clear goal button to goal planning
This commit is contained in:
parent
8e629ef596
commit
efe58eeea9
@ -285,8 +285,9 @@ class _AbsencesPageState extends State<AbsencesPage>
|
||||
content: Text("attention_body".i18n),
|
||||
actions: [
|
||||
ActionButton(
|
||||
label: "Ok",
|
||||
onTap: () => Navigator.of(context).pop())
|
||||
label: "Ok",
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -6,10 +6,12 @@ import 'package:filcnaplo/models/settings.dart';
|
||||
import 'package:filcnaplo_kreta_api/models/grade.dart';
|
||||
import 'package:filcnaplo_kreta_api/models/subject.dart';
|
||||
import 'package:filcnaplo_kreta_api/providers/grade_provider.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/action_button.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/average_display.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/panel/panel.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/progress_bar.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/round_border_icon.dart';
|
||||
import 'package:filcnaplo_premium/providers/goal_provider.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/goal_planner/goal_planner.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/goal_planner/goal_state_screen.i18n.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/goal_planner/route_option.dart';
|
||||
@ -199,11 +201,39 @@ class _GoalStateScreenState extends State<GoalStateScreen> {
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
const Row(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
BackButton(),
|
||||
const BackButton(),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
title: Text("attention".i18n),
|
||||
content: Text("attention_body".i18n),
|
||||
actions: [
|
||||
ActionButton(
|
||||
label: "delete".i18n,
|
||||
onTap: () async {
|
||||
// clear the goal
|
||||
await Provider.of<GoalProvider>(context,
|
||||
listen: false)
|
||||
.clearGoal(widget.subject);
|
||||
// close the modal and the goal page
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
icon: const Icon(FeatherIcons.x),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 22.0),
|
||||
|
@ -22,6 +22,11 @@ extension Localization on String {
|
||||
"improved_by": "and improved your grade by %s",
|
||||
"detailed_stats": "See my detailed stats",
|
||||
"later": "Yay! I'll see my stats later.",
|
||||
// sure delete modal
|
||||
"delete": "Delete",
|
||||
"attention": "Attention!",
|
||||
"attention_body":
|
||||
"Your goal and progress will be lost forever and cannot be restored.",
|
||||
},
|
||||
"hu_hu": {
|
||||
// base page
|
||||
@ -42,6 +47,11 @@ extension Localization on String {
|
||||
"improved_by": "%s-os javulást értél el!",
|
||||
"detailed_stats": "Részletes statisztikám",
|
||||
"later": "Hurrá! Megnézem máskor.",
|
||||
// sure delete modal
|
||||
"delete": "Törlés",
|
||||
"attention": "Figyelem!",
|
||||
"attention_body":
|
||||
"A kitűzött célod és haladásod örökre elveszik és nem lesz visszaállítható.",
|
||||
},
|
||||
"de_de": {
|
||||
// base page
|
||||
@ -62,6 +72,11 @@ extension Localization on String {
|
||||
"improved_by": "Sie haben %s Verbesserung erreicht!",
|
||||
"detailed_stats": "Detaillierte Statistiken",
|
||||
"later": "Hurra! Ich schaue später nach.",
|
||||
// sure delete modal
|
||||
"delete": "Löschen",
|
||||
"attention": "Achtung!",
|
||||
"attention_body":
|
||||
"Ihr Ziel und Ihr Fortschritt gehen für immer verloren und können nicht wiederhergestellt werden.",
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user