mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
feat: use defined font
This commit is contained in:
BIN
ui/fonts/NotoSansSC-Regular.ttf
Normal file
BIN
ui/fonts/NotoSansSC-Regular.ttf
Normal file
Binary file not shown.
BIN
ui/fonts/Roboto.ttf
Normal file
BIN
ui/fonts/Roboto.ttf
Normal file
Binary file not shown.
@@ -167,6 +167,8 @@ class MyApp extends StatelessWidget {
|
|||||||
// labelMedium: TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]),
|
// labelMedium: TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]),
|
||||||
// labelSmall: TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]),
|
// labelSmall: TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]),
|
||||||
// ),
|
// ),
|
||||||
|
fontFamily: "NotoSansSC",
|
||||||
|
fontFamilyFallback: const ["PingFang SC", "Heiti SC"],
|
||||||
|
|
||||||
colorScheme: ColorScheme.fromSeed(
|
colorScheme: ColorScheme.fromSeed(
|
||||||
seedColor: Colors.blue, brightness: Brightness.dark),
|
seedColor: Colors.blue, brightness: Brightness.dark),
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ var storageSettingProvider =
|
|||||||
AsyncNotifierProvider.autoDispose<StorageSettingData, List<Storage>>(
|
AsyncNotifierProvider.autoDispose<StorageSettingData, List<Storage>>(
|
||||||
StorageSettingData.new);
|
StorageSettingData.new);
|
||||||
|
|
||||||
class EditSettingData extends FamilyAsyncNotifier<String, String> {
|
class EditSettingData extends AutoDisposeFamilyAsyncNotifier<String, String> {
|
||||||
String? key;
|
String? key;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -53,7 +53,7 @@ class EditSettingData extends FamilyAsyncNotifier<String, String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class IndexerSetting extends AsyncNotifier<List<Indexer>> {
|
class IndexerSetting extends AutoDisposeAsyncNotifier<List<Indexer>> {
|
||||||
@override
|
@override
|
||||||
FutureOr<List<Indexer>> build() async {
|
FutureOr<List<Indexer>> build() async {
|
||||||
final dio = await APIs.getDio();
|
final dio = await APIs.getDio();
|
||||||
@@ -121,7 +121,7 @@ class Indexer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DownloadClientSetting extends AsyncNotifier<List<DownloadClient>> {
|
class DownloadClientSetting extends AutoDisposeAsyncNotifier<List<DownloadClient>> {
|
||||||
@override
|
@override
|
||||||
FutureOr<List<DownloadClient>> build() async {
|
FutureOr<List<DownloadClient>> build() async {
|
||||||
final dio = await APIs.getDio();
|
final dio = await APIs.getDio();
|
||||||
@@ -208,7 +208,7 @@ class DownloadClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StorageSettingData extends AsyncNotifier<List<Storage>> {
|
class StorageSettingData extends AutoDisposeAsyncNotifier<List<Storage>> {
|
||||||
@override
|
@override
|
||||||
FutureOr<List<Storage>> build() async {
|
FutureOr<List<Storage>> build() async {
|
||||||
final dio = await APIs.getDio();
|
final dio = await APIs.getDio();
|
||||||
|
|||||||
@@ -96,3 +96,10 @@ flutter:
|
|||||||
#
|
#
|
||||||
# For details regarding fonts from package dependencies,
|
# For details regarding fonts from package dependencies,
|
||||||
# see https://flutter.dev/custom-fonts/#from-packages
|
# see https://flutter.dev/custom-fonts/#from-packages
|
||||||
|
fonts:
|
||||||
|
- family: Roboto
|
||||||
|
fonts:
|
||||||
|
- asset: fonts/Roboto.ttf
|
||||||
|
- family: NotoSansSC
|
||||||
|
fonts:
|
||||||
|
- asset: fonts/NotoSansSC-Regular.ttf
|
||||||
|
|||||||
Reference in New Issue
Block a user