File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
objectbox/example/flutter/objectbox_demo_relations/lib Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ class _NewTagState extends State<NewTag> {
28
28
return FloatingActionButton .extended (
29
29
label: const Text ('New Tag' ),
30
30
heroTag: null ,
31
- onPressed: () => {
32
- showDialog (
31
+ onPressed: () async {
32
+ final dialog = await showDialog (
33
33
context: context,
34
34
builder: (BuildContext context) => AlertDialog (
35
35
title: const Text ('New tag' ),
@@ -43,14 +43,15 @@ class _NewTagState extends State<NewTag> {
43
43
child: const Text ('Submit' ),
44
44
onPressed: () {
45
45
_addTag (_tagInputController.text);
46
- _tagInputController.clear ();
47
-
48
46
Navigator .of (context).pop ();
49
47
},
50
48
),
51
49
],
52
50
),
53
- )
51
+ );
52
+ // Clear text after dialog is dismissed.
53
+ _tagInputController.clear ();
54
+ return dialog;
54
55
},
55
56
);
56
57
}
You can’t perform that action at this time.
0 commit comments