Initial commit
This commit is contained in:
parent
e46f792c49
commit
85cff9dba8
20 changed files with 663 additions and 0 deletions
17
lib/utils/secretLoader.dart
Normal file
17
lib/utils/secretLoader.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import 'dart:async' show Future;
|
||||
import 'dart:convert' show json;
|
||||
import 'package:flutter/services.dart' show rootBundle;
|
||||
|
||||
class SecretLoader {
|
||||
final String secretPath;
|
||||
|
||||
SecretLoader({this.secretPath});
|
||||
|
||||
Future<Map<String, dynamic>> load() {
|
||||
rootBundle.loadString(secretPath, cache: false);
|
||||
return rootBundle.loadStructuredData<Map<String, dynamic>>(this.secretPath,
|
||||
(jsonStr) async {
|
||||
return json.decode(jsonStr);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue