mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
Web - Add docker image and baseUrl config support (#32)
This commit is contained in:
parent
80a0fdbee4
commit
bfcbf5402d
12 changed files with 144 additions and 138 deletions
17
lib/util/fladder_config.dart
Normal file
17
lib/util/fladder_config.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class FladderConfig {
|
||||
static FladderConfig _instance = FladderConfig._();
|
||||
FladderConfig._();
|
||||
|
||||
static String? get baseUrl => _instance._baseUrl;
|
||||
static set baseUrl(String? value) => _instance._baseUrl = value;
|
||||
String? _baseUrl;
|
||||
|
||||
static void fromJson(Map<String, dynamic> json) => _instance = FladderConfig._fromJson(json);
|
||||
|
||||
factory FladderConfig._fromJson(Map<String, dynamic> json) {
|
||||
final config = FladderConfig._();
|
||||
final newUrl = json['baseUrl'] as String?;
|
||||
config._baseUrl = newUrl?.isEmpty == true ? null : newUrl;
|
||||
return config;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue