diff --git a/lib/plan_tile.dart b/lib/plan_tile.dart index 2d1466c..e0ee355 100644 --- a/lib/plan_tile.dart +++ b/lib/plan_tile.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:fmassive/database.dart'; +import 'package:fmassive/edit_plan.dart'; import 'package:fmassive/main.dart'; import 'package:fmassive/start_plan.dart'; import 'package:moor_flutter/moor_flutter.dart'; @@ -19,6 +20,18 @@ class PlanTile extends StatelessWidget { Widget build(BuildContext context) { return MenuAnchor( menuChildren: [ + MenuItemButton( + child: const Text("Edit"), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + EditPlanPage(plan: plan.toCompanion(false)), + ), + ); + }, + ), MenuItemButton( onPressed: () async { await db.plans.deleteOne(plan);