style: small refactor in level_selection
This commit is contained in:
parent
d52f60ef92
commit
fc951a4df5
|
@ -78,6 +78,16 @@ class _LevelSelectionState extends State<LevelSelection> {
|
|||
}
|
||||
}
|
||||
|
||||
void filterLevels(String input) {
|
||||
setState(() {
|
||||
stepmaniaCoursesFoldersFiltered = stepmaniaCoursesFolders
|
||||
.where((simfile) => simfile.tags["TITLE"]!
|
||||
.toLowerCase()
|
||||
.contains(input.toLowerCase()))
|
||||
.toList();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
@ -111,15 +121,7 @@ class _LevelSelectionState extends State<LevelSelection> {
|
|||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 0.0),
|
||||
child: TextField(
|
||||
onChanged: (input) {
|
||||
setState(() {
|
||||
stepmaniaCoursesFoldersFiltered = stepmaniaCoursesFolders
|
||||
.where((simfile) => simfile.tags["TITLE"]!
|
||||
.toLowerCase()
|
||||
.contains(input.toLowerCase()))
|
||||
.toList();
|
||||
});
|
||||
},
|
||||
onChanged: filterLevels,
|
||||
decoration: InputDecoration(
|
||||
// icon: Icon(Icons.search),
|
||||
hintText: 'Search'),
|
||||
|
@ -151,7 +153,10 @@ class _LevelSelectionState extends State<LevelSelection> {
|
|||
}
|
||||
}),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () => {selectFolder()}, child: Icon(Icons.add)),
|
||||
onPressed: () {
|
||||
selectFolder();
|
||||
},
|
||||
child: Icon(Icons.add)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class _ESenseConnectDialogState extends State<ESenseConnectDialog> {
|
|||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, 'Cancel'),
|
||||
child: const Text('Discard'),
|
||||
child: const Text('Close'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => widget.connect(eSenseDeviceName),
|
||||
|
|
Loading…
Reference in a new issue