Skip to content
Snippets Groups Projects
Commit fb4571b5 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: implement funciton from last commit

parent 98f168e8
No related branches found
No related tags found
1 merge request!10Clhp map
......@@ -34,19 +34,21 @@ Future<void> initialiseState() async{
relationFuture = loadSavedRelation();
}
initSearchOptions();
selectedRelation = await relationFuture;
selectedMarkerList = await markerListFuture;
}
/// fetchAllLakeNames fetches a list of all lake names in the system
/// initSearchOptions fetches a list of all lake names in the system
/// and initialises lakeSearchOptions
Future<void> fetchAllLakeNames() async {
Future<void> initSearchOptions() async {
try {
HttpClient client = HttpClient()
..badCertificateCallback = // NB: temporary disable SSL certificate validation
(X509Certificate cert, String host, int port) => true;
var request = await client.getUrl(Uri.parse('${serverURI}/get_lake_names'));
var request = await client.getUrl(Uri.parse('$serverURI/get_lake_names'));
var response = await request.close();
if (response.statusCode == 200) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment