fix: import backup

This commit is contained in:
lollipopkit
2023-08-01 13:41:00 +08:00
parent 0f83d10bfa
commit 33932f7428
9 changed files with 26 additions and 34 deletions

View File

@@ -6,8 +6,6 @@ PODS:
- Flutter (1.0.0)
- flutter_native_splash (0.0.1):
- Flutter
- flutter_volume_controller (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -28,7 +26,6 @@ DEPENDENCIES:
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_volume_controller (from `.symlinks/plugins/flutter_volume_controller/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- plain_notification_token (from `.symlinks/plugins/plain_notification_token/ios`)
- r_upgrade (from `.symlinks/plugins/r_upgrade/ios`)
@@ -45,8 +42,6 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_volume_controller:
:path: ".symlinks/plugins/flutter_volume_controller/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
plain_notification_token:
@@ -65,7 +60,6 @@ SPEC CHECKSUMS:
file_picker: 1d63c4949e05e386da864365f8c13e1e64787675
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_volume_controller: e4d5832f08008180f76e30faf671ffd5a425e529
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
plain_notification_token: b36467dc91939a7b6754267c701bbaca14996ee1
r_upgrade: 44d715c61914cce3d01ea225abffe894fd51c114

View File

@@ -4,4 +4,6 @@ extension ContextX on BuildContext {
void pop<T extends Object?>([T? result]) {
Navigator.of(this).pop<T>(result);
}
bool get canPop => Navigator.of(this).canPop();
}

View File

@@ -26,10 +26,10 @@ Future<bool> shareFiles(BuildContext context, List<String> filePaths) async {
} else {
text = '${filePaths.length} ${S.of(context)!.files}';
}
_app.setCanMoveBg(false);
_app.moveBg = false;
// ignore: deprecated_member_use
await Share.shareFiles(filePaths, subject: 'ServerBox -> $text');
_app.setCanMoveBg(true);
_app.moveBg = true;
return filePaths.isNotEmpty;
}
@@ -38,9 +38,9 @@ void copy2Clipboard(String text) {
}
Future<String?> pickOneFile() async {
_app.setCanMoveBg(false);
_app.moveBg = false;
final result = await FilePicker.platform.pickFiles(type: FileType.any);
_app.setCanMoveBg(true);
_app.moveBg = true;
return result?.files.single.path;
}

View File

@@ -39,13 +39,13 @@ class ServerPrivateInfo {
ServerPrivateInfo.fromJson(Map<String, dynamic> json) {
name = json["name"].toString();
ip = json["ip"].toString();
port = int.tryParse(json["port"]) ?? 22;
port = json["port"] ?? 22;
user = json["user"].toString();
pwd = json["authorization"].toString();
pubKeyId = json["pubKeyId"]?.toString();
id = '$user@$ip:$port';
tags = json["tags"]?.cast<String>();
alterUrl = json["alterHost"]?.toString();
alterUrl = json["alterUrl"]?.toString();
}
Map<String, dynamic> toJson() {
@@ -57,7 +57,7 @@ class ServerPrivateInfo {
data["authorization"] = pwd;
data["pubKeyId"] = pubKeyId;
data["tags"] = tags;
data["alterHost"] = alterUrl;
data["alterUrl"] = alterUrl;
return data;
}

View File

@@ -4,15 +4,10 @@ class AppProvider extends BusyProvider {
int? _newestBuild;
int? get newestBuild => _newestBuild;
bool _moveBg = true;
bool get moveBg => _moveBg;
bool moveBg = true;
void setNewestBuild(int build) {
_newestBuild = build;
notifyListeners();
}
void setCanMoveBg(bool moveBg) {
_moveBg = moveBg;
}
}

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 397;
static const int build = 400;
static const String engine = "3.10.6";
static const String buildAt = "2023-07-28 20:51:35.807892";
static const int modifications = 6;
static const String buildAt = "2023-07-31 14:06:15.008140";
static const int modifications = 9;
}

View File

@@ -41,6 +41,7 @@ class _HomePageState extends State<HomePage>
WidgetsBindingObserver {
final _serverProvider = locator<ServerProvider>();
final _setting = locator<SettingStore>();
final _app = locator<AppProvider>();
late final PageController _pageController;
@@ -90,7 +91,7 @@ class _HomePageState extends State<HomePage>
case AppLifecycleState.paused:
// Keep running in background on Android device
if (isAndroid && _setting.bgRun.fetch()!) {
if (locator<AppProvider>().moveBg) {
if (_app.moveBg) {
bgRunChannel.invokeMethod('sendToBackground');
}
} else {

View File

@@ -475,9 +475,9 @@
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 397;
CURRENT_PROJECT_VERSION = 400;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.397;
MARKETING_VERSION = 1.0.400;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -490,9 +490,9 @@
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 397;
CURRENT_PROJECT_VERSION = 400;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.397;
MARKETING_VERSION = 1.0.400;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -505,9 +505,9 @@
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 397;
CURRENT_PROJECT_VERSION = 400;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.397;
MARKETING_VERSION = 1.0.400;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;