mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-16 08:20:48 +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"]),
|
||||
// labelSmall: TextStyle(fontFamilyFallback: ["PingFang SC", "Heiti SC"]),
|
||||
// ),
|
||||
fontFamily: "NotoSansSC",
|
||||
fontFamilyFallback: const ["PingFang SC", "Heiti SC"],
|
||||
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: Colors.blue, brightness: Brightness.dark),
|
||||
|
||||
@@ -21,7 +21,7 @@ var storageSettingProvider =
|
||||
AsyncNotifierProvider.autoDispose<StorageSettingData, List<Storage>>(
|
||||
StorageSettingData.new);
|
||||
|
||||
class EditSettingData extends FamilyAsyncNotifier<String, String> {
|
||||
class EditSettingData extends AutoDisposeFamilyAsyncNotifier<String, String> {
|
||||
String? key;
|
||||
|
||||
@override
|
||||
@@ -53,7 +53,7 @@ class EditSettingData extends FamilyAsyncNotifier<String, String> {
|
||||
}
|
||||
}
|
||||
|
||||
class IndexerSetting extends AsyncNotifier<List<Indexer>> {
|
||||
class IndexerSetting extends AutoDisposeAsyncNotifier<List<Indexer>> {
|
||||
@override
|
||||
FutureOr<List<Indexer>> build() async {
|
||||
final dio = await APIs.getDio();
|
||||
@@ -121,7 +121,7 @@ class Indexer {
|
||||
}
|
||||
}
|
||||
|
||||
class DownloadClientSetting extends AsyncNotifier<List<DownloadClient>> {
|
||||
class DownloadClientSetting extends AutoDisposeAsyncNotifier<List<DownloadClient>> {
|
||||
@override
|
||||
FutureOr<List<DownloadClient>> build() async {
|
||||
final dio = await APIs.getDio();
|
||||
@@ -208,7 +208,7 @@ class DownloadClient {
|
||||
}
|
||||
}
|
||||
|
||||
class StorageSettingData extends AsyncNotifier<List<Storage>> {
|
||||
class StorageSettingData extends AutoDisposeAsyncNotifier<List<Storage>> {
|
||||
@override
|
||||
FutureOr<List<Storage>> build() async {
|
||||
final dio = await APIs.getDio();
|
||||
|
||||
@@ -96,3 +96,10 @@ flutter:
|
||||
#
|
||||
# For details regarding fonts from package dependencies,
|
||||
# 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