mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#19 fix & opt
- opt: android default dir move to external storage - fix: err when font not exist
This commit is contained in:
@@ -107,7 +107,8 @@ String tabTitleName(BuildContext context, int i) {
|
||||
|
||||
Future<void> loadFontFile(String? localPath) async {
|
||||
if (localPath == null) return;
|
||||
final name = getFileName(localPath)!;
|
||||
final name = getFileName(localPath);
|
||||
if (name == null) return;
|
||||
var fontLoader = FontLoader(name);
|
||||
fontLoader.addFont(File(localPath).readAsBytes().byteData);
|
||||
await fontLoader.load();
|
||||
|
||||
Reference in New Issue
Block a user