File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
open_wearable/lib/widgets/sensors/configuration Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,18 @@ class _SaveConfigRowState extends State<SaveConfigRow> {
2222 Widget build (BuildContext context) {
2323 return PlatformListTile (
2424 title: PlatformTextField (
25- onSubmitted : (value) async {
25+ onChanged : (value) {
2626 setState (() {
2727 _configName = value;
2828 });
2929 },
30+ onSubmitted: (value) async {
31+ setState (() {
32+ _configName = value.trim ();
33+ });
34+ },
35+ onTapOutside: (event) => FocusScope .of (context).unfocus (),
36+ hintText: "Save as..." ,
3037 ),
3138 trailing: PlatformElevatedButton (
3239 onPressed: () async {
@@ -37,7 +44,7 @@ class _SaveConfigRowState extends State<SaveConfigRow> {
3744 _logger.d ("Saving configuration: $_configName with data: $config " );
3845
3946 if (_configName.isNotEmpty) {
40- await SensorConfigurationStorage .saveConfiguration (_configName, config);
47+ await SensorConfigurationStorage .saveConfiguration (_configName. trim () , config);
4148 } else {
4249 showPlatformDialog (
4350 context: context,
You can’t perform that action at this time.
0 commit comments