mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 14:29:35 +00:00
123
This commit is contained in:
parent
178f3fbdb1
commit
634ffaed8c
27 changed files with 648 additions and 1012 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// brand color rgb(49, 27, 146) rgb(96, 76, 236)
|
||||
|
|
@ -13,3 +15,18 @@ final brandDarkColorScheme = ColorScheme.fromSeed(
|
|||
seedColor: brandColor,
|
||||
brightness: Brightness.dark,
|
||||
);
|
||||
|
||||
/// 系统字体(跨平台)
|
||||
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'; // 其他平台回退
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue