Ajustes de estilo/linting en los helpers centered* de layout, appIntroPage, roundedButton, secretLoader y utils (refactor pendiente).
17 lines
460 B
Dart
17 lines
460 B
Dart
import 'dart:async' show Future;
|
|
import 'dart:convert' show json;
|
|
import 'package:flutter/services.dart' show rootBundle;
|
|
|
|
class SecretLoader {
|
|
final String secretPath;
|
|
|
|
SecretLoader({required this.secretPath});
|
|
|
|
Future<Map<String, dynamic>> load() {
|
|
rootBundle.loadString(secretPath, cache: false);
|
|
return rootBundle.loadStructuredData<Map<String, dynamic>>(secretPath,
|
|
(jsonStr) async {
|
|
return json.decode(jsonStr);
|
|
});
|
|
}
|
|
}
|