diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index b4133801..968a9cdc 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -359,7 +359,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 243; + CURRENT_PROJECT_VERSION = 244; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -367,7 +367,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.243; + MARKETING_VERSION = 1.0.244; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -490,7 +490,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 243; + CURRENT_PROJECT_VERSION = 244; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -498,7 +498,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.243; + MARKETING_VERSION = 1.0.244; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -515,7 +515,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 243; + CURRENT_PROJECT_VERSION = 244; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -523,7 +523,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.243; + MARKETING_VERSION = 1.0.244; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/core/utils/ui.dart b/lib/core/utils/ui.dart index 7bf362d4..099eb1cb 100644 --- a/lib/core/utils/ui.dart +++ b/lib/core/utils/ui.dart @@ -107,7 +107,8 @@ String tabTitleName(BuildContext context, int i) { Future 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(); diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index dcc37a9b..0b933819 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,8 +2,8 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 243; + static const int build = 244; static const String engine = "Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 2ad6cd72c0 (13 days ago) • 2023-03-08 09:41:59 -0800\nEngine • revision 1837b5be5f\nTools • Dart 2.19.4 • DevTools 2.20.1\n"; - static const String buildAt = "2023-03-21 15:18:42.802605"; - static const int modifications = 5; + static const String buildAt = "2023-03-21 15:36:44.082988"; + static const int modifications = 2; } diff --git a/lib/data/res/path.dart b/lib/data/res/path.dart index 05da9443..29c88779 100644 --- a/lib/data/res/path.dart +++ b/lib/data/res/path.dart @@ -1,8 +1,18 @@ import 'dart:io'; import 'package:path_provider/path_provider.dart'; +import 'package:toolbox/core/utils/platform.dart'; -Future get docDir async => await getApplicationDocumentsDirectory(); +Future get docDir async { + if (isAndroid) { + final dir = await getExternalStorageDirectory(); + if (dir != null) { + return Directory('${dir.path}/server_box'); + } + // fallthrough to getApplicationDocumentsDirectory + } + return await getApplicationDocumentsDirectory(); +} Future get sftpDownloadDir async { final dir = Directory('${(await docDir).path}/sftp');