File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
screens/home_page/editor_pane Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ class URLTextField extends ConsumerWidget {
81
81
.read (collectionStateNotifierProvider.notifier)
82
82
.update (selectedId, url: value);
83
83
},
84
+ onFieldSubmitted: (value) {
85
+ ref
86
+ .read (collectionStateNotifierProvider.notifier)
87
+ .sendRequest (selectedId);
88
+ },
84
89
);
85
90
}
86
91
}
Original file line number Diff line number Diff line change @@ -7,11 +7,13 @@ class URLField extends StatelessWidget {
7
7
required this .selectedId,
8
8
this .initialValue,
9
9
this .onChanged,
10
+ this .onFieldSubmitted,
10
11
});
11
12
12
13
final String selectedId;
13
14
final String ? initialValue;
14
15
final void Function (String )? onChanged;
16
+ final void Function (String )? onFieldSubmitted;
15
17
16
18
@override
17
19
Widget build (BuildContext context) {
@@ -29,6 +31,7 @@ class URLField extends StatelessWidget {
29
31
border: InputBorder .none,
30
32
),
31
33
onChanged: onChanged,
34
+ onFieldSubmitted: onFieldSubmitted,
32
35
);
33
36
}
34
37
}
You can’t perform that action at this time.
0 commit comments