Locations persist. Leaflet and Rest queries
This commit is contained in:
parent
7fbe5b971d
commit
b5b8b3da51
13 changed files with 196 additions and 192 deletions
|
|
@ -1,19 +1,19 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'firesApp.dart';
|
||||
|
||||
import 'package:comunes_flutter/comunes_flutter.dart';
|
||||
import 'dart:async';
|
||||
import 'globals.dart' as globals;
|
||||
import 'basicLocationPersist.dart';
|
||||
|
||||
Future<String> getGMapKey() async {
|
||||
Secret secret = await SecretLoader(secretPath: 'assets/private-settings.json')
|
||||
.load('gmap_key');
|
||||
return secret.apiKey;
|
||||
Future<Map<String, dynamic>> loadSecrets() async {
|
||||
return await SecretLoader(secretPath: 'assets/private-settings.json').load();
|
||||
}
|
||||
|
||||
void main() {
|
||||
getGMapKey().then((String gmapKey) {
|
||||
globals.gmapKey = gmapKey;
|
||||
loadSecrets().then((secrets) {
|
||||
globals.firesApiKey = secrets['firesApiKey'];
|
||||
globals.gmapKey = secrets['gmapKey'];
|
||||
globals.prefs.then((prefs) {
|
||||
loadYourLocations(prefs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue