opt.: store

This commit is contained in:
lollipopkit
2023-08-28 18:07:22 +08:00
parent e20f2d32e8
commit 11c3bf795b
20 changed files with 193 additions and 122 deletions

View File

@@ -76,7 +76,7 @@ void showLoadingDialog(BuildContext context, {bool barrierDismiss = false}) {
Widget buildSwitch(
BuildContext context,
StoreProperty<bool> prop, {
StorePropertyBase<bool> prop, {
void Function(bool)? func,
}) {
return ValueListenableBuilder(
@@ -115,8 +115,8 @@ String tabTitleName(BuildContext context, AppTab tab) {
}
}
Future<void> loadFontFile(String? localPath) async {
if (localPath == null) return;
Future<void> loadFontFile(String localPath) async {
if (localPath.isEmpty) return;
final name = getFileName(localPath);
if (name == null) return;
var fontLoader = FontLoader(name);