Public Access
chore(formatting): autoformats and adaptations
This commit is contained in:
+10
-7
@@ -73,11 +73,12 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
_counter++;
|
||||
});
|
||||
}
|
||||
|
||||
// TODO :find a better way to show the list
|
||||
void show_result(Future<List<String>> future_id) async {
|
||||
var tmp = await future_id;
|
||||
id = tmp[0];
|
||||
setState(() { });
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -123,12 +124,14 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text('API key from ENV is $API_KEY'),
|
||||
MaterialButton(onPressed: () { show_result(ApiHandler.findStations('S Biesdorf')); setState(() {}); },
|
||||
child: Text(
|
||||
'Search for \'S Biesdorf\''
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
show_result(ApiHandler.findStations('S Biesdorf'));
|
||||
setState(() {});
|
||||
},
|
||||
child: Text('Search for \'S Biesdorf\''),
|
||||
),
|
||||
Text(id)
|
||||
Text(id),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -139,4 +142,4 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user