mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +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) {
|
Widget build(BuildContext context) {
|
||||||
var theme = Theme.of(context);
|
var theme = Theme.of(context);
|
||||||
|
|
||||||
return Scaffold(
|
var s = Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back),
|
icon: const Icon(Icons.arrow_back),
|
||||||
@ -54,6 +54,14 @@ class _NoteTagEditorState extends State<NoteTagEditor> {
|
|||||||
),
|
),
|
||||||
body: buildView(_textController.text),
|
body: buildView(_textController.text),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async {
|
||||||
|
Navigator.of(context).pop(_selectedTags);
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
child: s,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildView(String query) {
|
Widget buildView(String query) {
|
||||||
|
Reference in New Issue
Block a user