refactor(apps): 主题系统迁移至 ColorScheme + 扩展架构并支持 Dark Mode
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
||||
class Env {
|
||||
static String get apiUrl {
|
||||
final backendUrl = const String.fromEnvironment('BACKEND_URL');
|
||||
@@ -11,4 +13,14 @@ class Env {
|
||||
}
|
||||
return 'http://localhost:5775';
|
||||
}
|
||||
|
||||
static String version = '0.1.0';
|
||||
static int build = 1;
|
||||
|
||||
static Future<void> init() async {
|
||||
final info = await PackageInfo.fromPlatform();
|
||||
version = info.version;
|
||||
final buildStr = info.buildNumber.isEmpty ? '1' : info.buildNumber;
|
||||
build = int.tryParse(buildStr) ?? 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user