opt.: upgrade linter & fix lint issues

This commit is contained in:
lollipopkit
2023-12-06 11:09:05 +08:00
parent 143cb1e7c1
commit 8a3fd342c6
38 changed files with 92 additions and 94 deletions

View File

@@ -586,7 +586,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -596,7 +596,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -720,7 +720,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -730,7 +730,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -748,7 +748,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -758,7 +758,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -779,7 +779,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@@ -792,7 +792,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -818,7 +818,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@@ -831,7 +831,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
@@ -854,7 +854,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@@ -867,7 +867,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
@@ -890,7 +890,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -902,7 +902,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
@@ -931,7 +931,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -943,7 +943,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox; PRODUCT_NAME = ServerBox;
@@ -969,7 +969,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 664; CURRENT_PROJECT_VERSION = 665;
DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6; DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -981,7 +981,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.664; MARKETING_VERSION = 1.0.665;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox; PRODUCT_NAME = ServerBox;

View File

@@ -22,7 +22,7 @@ const _drawerTheme = DrawerThemeData(
); );
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key); const MyApp({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -25,8 +25,8 @@ enum SSHErrType {
} }
class SSHErr extends Err<SSHErrType> { class SSHErr extends Err<SSHErrType> {
SSHErr({required SSHErrType type, String? message}) SSHErr({required super.type, super.message})
: super(from: ErrFrom.ssh, type: type, message: message); : super(from: ErrFrom.ssh);
@override @override
String toString() { String toString() {
@@ -47,8 +47,8 @@ enum DockerErrType {
} }
class DockerErr extends Err<DockerErrType> { class DockerErr extends Err<DockerErrType> {
DockerErr({required DockerErrType type, String? message}) DockerErr({required super.type, super.message})
: super(from: ErrFrom.docker, type: type, message: message); : super(from: ErrFrom.docker);
@override @override
String toString() { String toString() {
@@ -63,8 +63,8 @@ enum ICloudErrType {
} }
class ICloudErr extends Err<ICloudErrType> { class ICloudErr extends Err<ICloudErrType> {
ICloudErr({required ICloudErrType type, String? message}) ICloudErr({required super.type, super.message})
: super(from: ErrFrom.icloud, type: type, message: message); : super(from: ErrFrom.icloud);
@override @override
String toString() { String toString() {
@@ -79,8 +79,8 @@ enum WebdavErrType {
} }
class WebdavErr extends Err<WebdavErrType> { class WebdavErr extends Err<WebdavErrType> {
WebdavErr({required WebdavErrType type, String? message}) WebdavErr({required super.type, super.message})
: super(from: ErrFrom.webdav, type: type, message: message); : super(from: ErrFrom.webdav);
@override @override
String toString() { String toString() {

View File

@@ -75,29 +75,30 @@ class SftpReqStatus {
} }
void onNotify(dynamic event) { void onNotify(dynamic event) {
switch (event.runtimeType) { var shouldDispose = false;
case SftpWorkerStatus: switch (event) {
status = event; case SftpWorkerStatus val:
status = val;
if (status == SftpWorkerStatus.finished) { if (status == SftpWorkerStatus.finished) {
dispose(); dispose();
} }
break; break;
case double: case double val:
progress = event; progress = val;
break; break;
case int: case int val:
size = event; size = val;
break; break;
case Duration: case Duration d:
spentTime = event; spentTime = d;
break; break;
default: default:
error = Exception('sftp worker event: $event'); error = Exception('sftp worker event: $event');
Loggers.app.warning(error); Loggers.app.warning(error);
dispose(); shouldDispose = true;
break;
} }
notifyListeners(); notifyListeners();
if (shouldDispose) dispose();
} }
} }

View File

@@ -55,9 +55,9 @@ Future<void> isolateMessageHandler(
SendPort mainSendPort, SendPort mainSendPort,
SendErrorFunction sendError, SendErrorFunction sendError,
) async { ) async {
switch (data.runtimeType) { switch (data) {
case SftpReq: case SftpReq val:
switch (data.type) { switch (val.type) {
case SftpReqType.download: case SftpReqType.download:
await _download(data, mainSendPort, sendError); await _download(data, mainSendPort, sendError);
break; break;

View File

@@ -2,9 +2,9 @@
class BuildData { class BuildData {
static const String name = "ServerBox"; static const String name = "ServerBox";
static const int build = 664; static const int build = 665;
static const String engine = "3.16.2"; static const String engine = "3.16.2";
static const String buildAt = "2023-12-04 15:12:44"; static const String buildAt = "2023-12-05 18:58:17";
static const int modifications = 1; static const int modifications = 1;
static const int script = 31; static const int script = 31;
} }

View File

@@ -25,7 +25,7 @@ import '../../data/res/ui.dart';
import '../widget/custom_appbar.dart'; import '../widget/custom_appbar.dart';
class BackupPage extends StatelessWidget { class BackupPage extends StatelessWidget {
BackupPage({Key? key}) : super(key: key); BackupPage({super.key});
final icloudLoading = ValueNotifier(false); final icloudLoading = ValueNotifier(false);
final webdavLoading = ValueNotifier(false); final webdavLoading = ValueNotifier(false);

View File

@@ -6,7 +6,7 @@ import 'package:toolbox/data/provider/debug.dart';
import '../widget/custom_appbar.dart'; import '../widget/custom_appbar.dart';
class DebugPage extends StatefulWidget { class DebugPage extends StatefulWidget {
const DebugPage({Key? key}) : super(key: key); const DebugPage({super.key});
@override @override
_DebugPageState createState() => _DebugPageState(); _DebugPageState createState() => _DebugPageState();

View File

@@ -26,7 +26,7 @@ import '../widget/url_text.dart';
class DockerManagePage extends StatefulWidget { class DockerManagePage extends StatefulWidget {
final ServerPrivateInfo spi; final ServerPrivateInfo spi;
const DockerManagePage({required this.spi, Key? key}) : super(key: key); const DockerManagePage({required this.spi, super.key});
@override @override
State<DockerManagePage> createState() => _DockerManagePageState(); State<DockerManagePage> createState() => _DockerManagePageState();

View File

@@ -32,12 +32,12 @@ class EditorPage extends StatefulWidget {
final String? title; final String? title;
const EditorPage({ const EditorPage({
Key? key, super.key,
this.path, this.path,
this.text, this.text,
this.langCode, this.langCode,
this.title, this.title,
}) : super(key: key); });
@override @override
_EditorPageState createState() => _EditorPageState(); _EditorPageState createState() => _EditorPageState();

View File

@@ -23,7 +23,7 @@ import '../../data/model/server/server_private_info.dart';
import '../../data/res/color.dart'; import '../../data/res/color.dart';
class FullScreenPage extends StatefulWidget { class FullScreenPage extends StatefulWidget {
const FullScreenPage({Key? key}) : super(key: key); const FullScreenPage({super.key});
@override @override
_FullScreenPageState createState() => _FullScreenPageState(); _FullScreenPageState createState() => _FullScreenPageState();

View File

@@ -32,7 +32,7 @@ import '../widget/url_text.dart';
import '../widget/value_notifier.dart'; import '../widget/value_notifier.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key); const HomePage({super.key});
@override @override
State<HomePage> createState() => _HomePageState(); State<HomePage> createState() => _HomePageState();

View File

@@ -20,7 +20,7 @@ import '../widget/cardx.dart';
final targetReg = RegExp(r'[a-zA-Z0-9\.-_:]+'); final targetReg = RegExp(r'[a-zA-Z0-9\.-_:]+');
class PingPage extends StatefulWidget { class PingPage extends StatefulWidget {
const PingPage({Key? key}) : super(key: key); const PingPage({super.key});
@override @override
_PingPageState createState() => _PingPageState(); _PingPageState createState() => _PingPageState();

View File

@@ -21,7 +21,7 @@ import '../../widget/custom_appbar.dart';
const _format = 'text/plain'; const _format = 'text/plain';
class PrivateKeyEditPage extends StatefulWidget { class PrivateKeyEditPage extends StatefulWidget {
const PrivateKeyEditPage({Key? key, this.pki}) : super(key: key); const PrivateKeyEditPage({super.key, this.pki});
final PrivateKeyInfo? pki; final PrivateKeyInfo? pki;

View File

@@ -18,7 +18,7 @@ import '../../widget/custom_appbar.dart';
import '../../widget/cardx.dart'; import '../../widget/cardx.dart';
class PrivateKeysListPage extends StatefulWidget { class PrivateKeysListPage extends StatefulWidget {
const PrivateKeysListPage({Key? key}) : super(key: key); const PrivateKeysListPage({super.key});
@override @override
_PrivateKeyListState createState() => _PrivateKeyListState(); _PrivateKeyListState createState() => _PrivateKeyListState();

View File

@@ -25,7 +25,7 @@ import '../../widget/custom_appbar.dart';
import '../../widget/cardx.dart'; import '../../widget/cardx.dart';
class ServerDetailPage extends StatefulWidget { class ServerDetailPage extends StatefulWidget {
const ServerDetailPage({Key? key, required this.spi}) : super(key: key); const ServerDetailPage({super.key, required this.spi});
final ServerPrivateInfo spi; final ServerPrivateInfo spi;

View File

@@ -20,7 +20,7 @@ import '../../widget/tag.dart';
import '../../widget/value_notifier.dart'; import '../../widget/value_notifier.dart';
class ServerEditPage extends StatefulWidget { class ServerEditPage extends StatefulWidget {
const ServerEditPage({Key? key, this.spi}) : super(key: key); const ServerEditPage({super.key, this.spi});
final ServerPrivateInfo? spi; final ServerPrivateInfo? spi;

View File

@@ -29,7 +29,7 @@ import '../../widget/server_func_btns.dart';
import '../../widget/tag.dart'; import '../../widget/tag.dart';
class ServerPage extends StatefulWidget { class ServerPage extends StatefulWidget {
const ServerPage({Key? key}) : super(key: key); const ServerPage({super.key});
@override @override
_ServerPageState createState() => _ServerPageState(); _ServerPageState createState() => _ServerPageState();

View File

@@ -15,7 +15,7 @@ import 'package:toolbox/view/widget/cardx.dart';
import 'package:toolbox/view/widget/store_switch.dart'; import 'package:toolbox/view/widget/store_switch.dart';
class AndroidSettingsPage extends StatefulWidget { class AndroidSettingsPage extends StatefulWidget {
const AndroidSettingsPage({Key? key}) : super(key: key); const AndroidSettingsPage({super.key});
@override @override
_AndroidSettingsPageState createState() => _AndroidSettingsPageState(); _AndroidSettingsPageState createState() => _AndroidSettingsPageState();

View File

@@ -35,7 +35,7 @@ import '../../widget/store_switch.dart';
import '../../widget/value_notifier.dart'; import '../../widget/value_notifier.dart';
class SettingPage extends StatefulWidget { class SettingPage extends StatefulWidget {
const SettingPage({Key? key}) : super(key: key); const SettingPage({super.key});
@override @override
_SettingPageState createState() => _SettingPageState(); _SettingPageState createState() => _SettingPageState();

View File

@@ -20,7 +20,7 @@ import 'package:toolbox/view/widget/store_switch.dart';
import 'package:watch_connectivity/watch_connectivity.dart'; import 'package:watch_connectivity/watch_connectivity.dart';
class IOSSettingsPage extends StatefulWidget { class IOSSettingsPage extends StatefulWidget {
const IOSSettingsPage({Key? key}) : super(key: key); const IOSSettingsPage({super.key});
@override @override
_IOSSettingsPageState createState() => _IOSSettingsPageState(); _IOSSettingsPageState createState() => _IOSSettingsPageState();

View File

@@ -9,7 +9,7 @@ import 'package:toolbox/view/widget/cardx.dart';
import '../../widget/custom_appbar.dart'; import '../../widget/custom_appbar.dart';
class ServerOrderPage extends StatefulWidget { class ServerOrderPage extends StatefulWidget {
const ServerOrderPage({Key? key}) : super(key: key); const ServerOrderPage({super.key});
@override @override
_ServerOrderPageState createState() => _ServerOrderPageState(); _ServerOrderPageState createState() => _ServerOrderPageState();

View File

@@ -11,7 +11,7 @@ import 'package:toolbox/view/widget/cardx.dart';
import '../../widget/custom_appbar.dart'; import '../../widget/custom_appbar.dart';
class SSHVirtKeySettingPage extends StatefulWidget { class SSHVirtKeySettingPage extends StatefulWidget {
const SSHVirtKeySettingPage({Key? key}) : super(key: key); const SSHVirtKeySettingPage({super.key});
@override @override
_SSHVirtKeySettingPageState createState() => _SSHVirtKeySettingPageState(); _SSHVirtKeySettingPageState createState() => _SSHVirtKeySettingPageState();

View File

@@ -13,7 +13,7 @@ import '../../widget/custom_appbar.dart';
import '../../widget/tag.dart'; import '../../widget/tag.dart';
class SnippetEditPage extends StatefulWidget { class SnippetEditPage extends StatefulWidget {
const SnippetEditPage({Key? key, this.snippet}) : super(key: key); const SnippetEditPage({super.key, this.snippet});
final Snippet? snippet; final Snippet? snippet;

View File

@@ -15,7 +15,7 @@ import '/data/provider/snippet.dart';
import '../../widget/cardx.dart'; import '../../widget/cardx.dart';
class SnippetListPage extends StatefulWidget { class SnippetListPage extends StatefulWidget {
const SnippetListPage({Key? key}) : super(key: key); const SnippetListPage({super.key});
@override @override
_SnippetListPageState createState() => _SnippetListPageState(); _SnippetListPageState createState() => _SnippetListPageState();

View File

@@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:dartssh2/dartssh2.dart'; import 'package:dartssh2/dartssh2.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -33,11 +32,11 @@ class SSHPage extends StatefulWidget {
final String? initCmd; final String? initCmd;
final bool pop; final bool pop;
const SSHPage({ const SSHPage({
Key? key, super.key,
required this.spi, required this.spi,
this.initCmd, this.initCmd,
this.pop = true, this.pop = true,
}) : super(key: key); });
@override @override
_SSHPageState createState() => _SSHPageState(); _SSHPageState createState() => _SSHPageState();

View File

@@ -27,10 +27,10 @@ class LocalStoragePage extends StatefulWidget {
final bool isPickFile; final bool isPickFile;
final String? initDir; final String? initDir;
const LocalStoragePage({ const LocalStoragePage({
Key? key, super.key,
required this.isPickFile, required this.isPickFile,
this.initDir, this.initDir,
}) : super(key: key); });
@override @override
State<LocalStoragePage> createState() => _LocalStoragePageState(); State<LocalStoragePage> createState() => _LocalStoragePageState();

View File

@@ -36,11 +36,11 @@ class SftpPage extends StatefulWidget {
final bool isSelect; final bool isSelect;
const SftpPage({ const SftpPage({
Key? key, super.key,
required this.spi, required this.spi,
required this.isSelect, required this.isSelect,
this.initPath, this.initPath,
}) : super(key: key); });
@override @override
_SftpPageState createState() => _SftpPageState(); _SftpPageState createState() => _SftpPageState();

View File

@@ -16,7 +16,7 @@ import '../../widget/custom_appbar.dart';
import '../../widget/cardx.dart'; import '../../widget/cardx.dart';
class SftpMissionPage extends StatefulWidget { class SftpMissionPage extends StatefulWidget {
const SftpMissionPage({Key? key}) : super(key: key); const SftpMissionPage({super.key});
@override @override
_SftpMissionPageState createState() => _SftpMissionPageState(); _SftpMissionPageState createState() => _SftpMissionPageState();

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CardX extends StatelessWidget { class CardX extends StatelessWidget {
const CardX(this.child, {Key? key, this.color}) : super(key: key); const CardX(this.child, {super.key, this.color});
final Widget child; final Widget child;
final Color? color; final Color? color;

View File

@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
class ChoiceChipX<T> extends StatelessWidget { class ChoiceChipX<T> extends StatelessWidget {
const ChoiceChipX({ const ChoiceChipX({
Key? key, super.key,
required this.label, required this.label,
required this.state, required this.state,
required this.value, required this.value,
}) : super(key: key); });
final String label; final String label;
final ChoiceController<T> state; final ChoiceController<T> state;

View File

@@ -6,10 +6,10 @@ class FadeIn extends StatefulWidget {
final Duration duration; final Duration duration;
const FadeIn({ const FadeIn({
Key? key, super.key,
required this.child, required this.child,
this.duration = const Duration(milliseconds: 477), this.duration = const Duration(milliseconds: 477),
}) : super(key: key); });
@override @override
_MyFadeInState createState() => _MyFadeInState(); _MyFadeInState createState() => _MyFadeInState();

View File

@@ -8,11 +8,11 @@ class OmitStartText extends StatelessWidget {
const OmitStartText( const OmitStartText(
this.text, { this.text, {
Key? key, super.key,
this.maxLines, this.maxLines,
this.style, this.style,
this.overflow, this.overflow,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -184,13 +184,13 @@ class TagSwitcher extends StatelessWidget {
final String all; final String all;
const TagSwitcher({ const TagSwitcher({
Key? key, super.key,
required this.tags, required this.tags,
required this.width, required this.width,
required this.onTagChanged, required this.onTagChanged,
required this.all, required this.all,
this.initTag, this.initTag,
}) : super(key: key); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
import 'package:toolbox/data/res/ui.dart'; import 'package:toolbox/data/res/ui.dart';
class TwoLineText extends StatelessWidget { class TwoLineText extends StatelessWidget {
const TwoLineText({Key? key, required this.up, required this.down}) const TwoLineText({super.key, required this.up, required this.down});
: super(key: key);
final String up; final String up;
final String down; final String down;

View File

@@ -14,12 +14,12 @@ class UrlText extends StatelessWidget {
final TextStyle style; final TextStyle style;
const UrlText({ const UrlText({
Key? key, super.key,
required this.text, required this.text,
this.replace, this.replace,
this.textAlign, this.textAlign,
this.style = const TextStyle(), this.style = const TextStyle(),
}) : super(key: key); });
List<InlineSpan> _buildTextSpans(Color c) { List<InlineSpan> _buildTextSpans(Color c) {
final widgets = <InlineSpan>[]; final widgets = <InlineSpan>[];
@@ -69,9 +69,8 @@ class UrlText extends StatelessWidget {
} }
class _LinkTextSpan extends TextSpan { class _LinkTextSpan extends TextSpan {
_LinkTextSpan({TextStyle? style, required String text, String? replace}) _LinkTextSpan({super.style, required String text, String? replace})
: super( : super(
style: style,
text: replace ?? text, text: replace ?? text,
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
..onTap = () { ..onTap = () {

View File

@@ -342,10 +342,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
sha256: be325344c1f3070354a1d84a231a1ba75ea85d413774ec4bdf444c023342e030 sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.5.0" version: "6.1.1"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@@ -371,10 +371,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "3.0.1"
flutter_localizations: flutter_localizations:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@@ -578,10 +578,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: lints name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "3.0.0"
local_auth: local_auth:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@@ -43,7 +43,7 @@ dependencies:
git: git:
ref: master ref: master
url: https://github.com/lollipopkit/xterm.dart url: https://github.com/lollipopkit/xterm.dart
file_picker: ^5.3.2 file_picker: ^6.1.1
plain_notification_token: ^0.0.4 plain_notification_token: ^0.0.4
highlight: ^0.7.0 highlight: ^0.7.0
flutter_highlight: ^0.7.0 flutter_highlight: ^0.7.0
@@ -71,7 +71,7 @@ dev_dependencies:
flutter_native_splash: ^2.1.6 flutter_native_splash: ^2.1.6
hive_generator: ^2.0.0 hive_generator: ^2.0.0
build_runner: ^2.3.2 build_runner: ^2.3.2
flutter_lints: ^2.0.0 flutter_lints: ^3.0.0
flutter_test: flutter_test:
sdk: flutter sdk: flutter