2026-01-05 17:29:24 +08:00
|
|
|
import 'dart:io';
|
|
|
|
|
|
2024-10-05 10:01:08 -04:00
|
|
|
import 'package:flutter/material.dart';
|
2024-09-18 00:00:27 -04:00
|
|
|
|
|
|
|
|
// brand color rgb(49, 27, 146) rgb(96, 76, 236)
|
|
|
|
|
const brandColor = Color(0xFF311B92);
|
|
|
|
|
const brandColorLight = Color(0xFF604CEC);
|
2024-10-05 10:01:08 -04:00
|
|
|
|
|
|
|
|
final brandLightColorScheme = ColorScheme.fromSeed(
|
|
|
|
|
seedColor: brandColor,
|
|
|
|
|
brightness: Brightness.light,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
final brandDarkColorScheme = ColorScheme.fromSeed(
|
|
|
|
|
seedColor: brandColor,
|
|
|
|
|
brightness: Brightness.dark,
|
|
|
|
|
);
|
2026-01-05 17:29:24 +08:00
|
|
|
|
|
|
|
|
/// 系统字体(跨平台)
|
|
|
|
|
String get fontFamilyPlatform {
|
|
|
|
|
if (Platform.isIOS || Platform.isMacOS) {
|
|
|
|
|
return 'PingFang SC'; // 苹方,仅苹果设备
|
|
|
|
|
} else if (Platform.isAndroid) {
|
|
|
|
|
return 'Roboto'; // Android 默认
|
|
|
|
|
} else if (Platform.isWindows) {
|
|
|
|
|
return 'Microsoft YaHei'; // Windows 微软雅黑
|
|
|
|
|
// } else if (Platform.isLinux) {
|
|
|
|
|
// return 'Ubuntu'; // Linux
|
|
|
|
|
} else {
|
|
|
|
|
return 'Arial'; // 其他平台回退
|
|
|
|
|
}
|
|
|
|
|
}
|