mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
Note Tag Editor: Capture back button
This way the tags are even updated with the back button.
This commit is contained in:
@ -34,7 +34,7 @@ class _NoteTagEditorState extends State<NoteTagEditor> {
|
||||
Widget build(BuildContext context) {
|
||||
var theme = Theme.of(context);
|
||||
|
||||
return Scaffold(
|
||||
var s = Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
@ -54,6 +54,14 @@ class _NoteTagEditorState extends State<NoteTagEditor> {
|
||||
),
|
||||
body: buildView(_textController.text),
|
||||
);
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.of(context).pop(_selectedTags);
|
||||
return false;
|
||||
},
|
||||
child: s,
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildView(String query) {
|
||||
|
Reference in New Issue
Block a user