2023-02-17 13:47:52 +01:00
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'dart:convert';
|
|
|
|
|
2023-02-19 17:31:46 +01:00
|
|
|
const String configJSONPath = 'assets/group3.json';
|
2023-02-17 13:47:52 +01:00
|
|
|
|
|
|
|
Future<Map<String, dynamic>> loadLocalConfigJSON() async {
|
|
|
|
String content = await rootBundle.loadString(configJSONPath);
|
|
|
|
return jsonDecode(content);
|
|
|
|
}
|
2023-02-19 17:31:46 +01:00
|
|
|
|
|
|
|
List<String>? jsonPropertyAsList(dynamic property) =>
|
|
|
|
property != null ? List.from(property) : null;
|
2023-02-20 19:32:23 +01:00
|
|
|
|
|
|
|
Map<String, dynamic> stringToJSON(String jsonString) => jsonDecode(jsonString);
|