Skip to content

Commit

Permalink
design changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leeashlee committed Oct 5, 2023
1 parent 7b55dcd commit 3b0b195
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
4 changes: 4 additions & 0 deletions lib/component/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class _CustomAppBarState extends State<CustomAppBar> {
@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,
Expand Down
31 changes: 25 additions & 6 deletions lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,31 @@ class _HomePageState extends State<HomePage> {
foregroundColor: Theme.of(context).colorScheme.onError,
onPressed: (context) => showDialog<String>(
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: <Widget>[
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'),
),
],
),
),
),
],
Expand Down

0 comments on commit 3b0b195

Please sign in to comment.