diff --git a/lib/component/custom_app_bar.dart b/lib/component/custom_app_bar.dart index ea9ed6f0..ae546c2d 100644 --- a/lib/component/custom_app_bar.dart +++ b/lib/component/custom_app_bar.dart @@ -32,6 +32,10 @@ class _CustomAppBarState extends State { @override Widget build(BuildContext context) { return AppBar( + leading: IconButton( + onPressed: () => Scaffold.of(context).openDrawer(), + icon: const Icon(Unicon.bars), + ), systemOverlayStyle: SystemUiOverlayStyle( statusBarColor: Theme.of(context).colorScheme.background, systemNavigationBarColor: Theme.of(context).colorScheme.background, diff --git a/lib/home_page.dart b/lib/home_page.dart index ee27c8b7..c725a360 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -280,12 +280,31 @@ class _HomePageState extends State { foregroundColor: Theme.of(context).colorScheme.onError, onPressed: (context) => showDialog( context: context, - builder: (context) => - CustomAlertDialog(AlertType.delFile, (input) { - setState( - () => removeNote(currI, currNotes), - ); - }), + builder: (context) => AlertDialog( + title: const Text('Do you wanna delete the note?'), + content: const Text("It can't be undone."), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'Cancel'), + child: const Text('Cancel'), + ), + FilledButton( + style: FilledButton.styleFrom( + backgroundColor: + Theme.of(context).colorScheme.error, + foregroundColor: + Theme.of(context).colorScheme.onError, + ), + onPressed: () { + setState(() { + Navigator.pop(context, 'OK'); + removeNote(currI, currNotes); + }); + }, + child: const Text('OK'), + ), + ], + ), ), ), ],