mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt. & new: icons
This commit is contained in:
@@ -672,7 +672,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -682,7 +682,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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";
|
||||||
@@ -808,7 +808,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -818,7 +818,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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";
|
||||||
@@ -836,7 +836,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -846,7 +846,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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";
|
||||||
@@ -867,7 +867,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -880,7 +880,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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;
|
||||||
@@ -906,7 +906,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -919,7 +919,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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)";
|
||||||
@@ -942,7 +942,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -955,7 +955,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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)";
|
||||||
@@ -978,7 +978,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -990,7 +990,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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;
|
||||||
@@ -1019,7 +1019,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1031,7 +1031,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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;
|
||||||
@@ -1057,7 +1057,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 = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1069,7 +1069,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
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;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:toolbox/core/extension/context/locale.dart';
|
|||||||
import 'package:toolbox/data/res/store.dart';
|
import 'package:toolbox/data/res/store.dart';
|
||||||
import 'package:toolbox/view/widget/choice_chip.dart';
|
import 'package:toolbox/view/widget/choice_chip.dart';
|
||||||
import 'package:toolbox/view/widget/tag.dart';
|
import 'package:toolbox/view/widget/tag.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../data/res/ui.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../view/widget/input_field.dart';
|
import '../../../view/widget/input_field.dart';
|
||||||
@@ -180,9 +181,9 @@ extension DialogX on BuildContext {
|
|||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
child: ValueListenableBuilder(
|
child: ValBuilder(
|
||||||
valueListenable: tag,
|
listenable: tag,
|
||||||
builder: (_, val, __) {
|
builder: (val) {
|
||||||
final items = itemsBuilder(val);
|
final items = itemsBuilder(val);
|
||||||
return Choice<T>(
|
return Choice<T>(
|
||||||
onChanged: (value) => vals = value,
|
onChanged: (value) => vals = value,
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 872;
|
static const int build = 873;
|
||||||
static const String engine = "3.19.5";
|
static const String engine = "3.19.5";
|
||||||
static const String buildAt = "2024-04-23 15:08:31";
|
static const String buildAt = "2024-04-23 17:37:20";
|
||||||
static const int modifications = 4;
|
static const int modifications = 2;
|
||||||
static const int script = 45;
|
static const int script = 45;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ final class _AppBar extends CustomAppBar {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: selectIndex,
|
listenable: selectIndex,
|
||||||
builder: (_, idx, __) {
|
builder: (idx) {
|
||||||
if (idx == AppTab.ssh.index) {
|
if (idx == AppTab.ssh.index) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: CustomAppBar.barHeight ??
|
height: CustomAppBar.barHeight ??
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import 'package:toolbox/data/res/url.dart';
|
|||||||
import 'package:toolbox/view/widget/appbar.dart';
|
import 'package:toolbox/view/widget/appbar.dart';
|
||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
import 'package:toolbox/view/widget/markdown.dart';
|
import 'package:toolbox/view/widget/markdown.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
part 'appbar.dart';
|
part 'appbar.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import 'package:toolbox/core/utils/misc.dart';
|
|||||||
import 'package:toolbox/data/res/misc.dart';
|
import 'package:toolbox/data/res/misc.dart';
|
||||||
import 'package:toolbox/data/res/provider.dart';
|
import 'package:toolbox/data/res/provider.dart';
|
||||||
import 'package:toolbox/view/widget/input_field.dart';
|
import 'package:toolbox/view/widget/input_field.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../core/utils/server.dart';
|
import '../../../core/utils/server.dart';
|
||||||
import '../../../data/model/server/private_key_info.dart';
|
import '../../../data/model/server/private_key_info.dart';
|
||||||
@@ -215,9 +216,9 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
|
|||||||
icon: Icons.password,
|
icon: Icons.password,
|
||||||
),
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).size.height * 0.1),
|
SizedBox(height: MediaQuery.of(context).size.height * 0.1),
|
||||||
ValueListenableBuilder(
|
ValBuilder(
|
||||||
valueListenable: _loading,
|
listenable: _loading,
|
||||||
builder: (_, val, __) => val ?? UIs.placeholder,
|
builder: (val) => val ?? UIs.placeholder,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import 'package:toolbox/view/widget/kv_row.dart';
|
|||||||
import 'package:toolbox/view/widget/percent_circle.dart';
|
import 'package:toolbox/view/widget/percent_circle.dart';
|
||||||
import 'package:toolbox/view/widget/row.dart';
|
import 'package:toolbox/view/widget/row.dart';
|
||||||
import 'package:toolbox/view/widget/two_line_text.dart';
|
import 'package:toolbox/view/widget/two_line_text.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
final class PvePage extends StatefulWidget {
|
final class PvePage extends StatefulWidget {
|
||||||
final ServerPrivateInfo spi;
|
final ServerPrivateInfo spi;
|
||||||
@@ -64,9 +65,9 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
appBar: CustomAppBar(
|
appBar: CustomAppBar(
|
||||||
title: TwoLineText(up: 'PVE', down: widget.spi.name),
|
title: TwoLineText(up: 'PVE', down: widget.spi.name),
|
||||||
actions: [
|
actions: [
|
||||||
ValueListenableBuilder(
|
ValBuilder(
|
||||||
valueListenable: _pve.err,
|
listenable: _pve.err,
|
||||||
builder: (_, val, __) => val == null
|
builder: (val) => val == null
|
||||||
? UIs.placeholder
|
? UIs.placeholder
|
||||||
: IconBtn(
|
: IconBtn(
|
||||||
icon: Icons.refresh,
|
icon: Icons.refresh,
|
||||||
@@ -79,9 +80,9 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: ValueListenableBuilder(
|
body: ValBuilder(
|
||||||
valueListenable: _pve.err,
|
listenable: _pve.err,
|
||||||
builder: (_, val, __) {
|
builder: (val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
return Padding(
|
return Padding(
|
||||||
@@ -91,9 +92,9 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: _pve.data,
|
listenable: _pve.data,
|
||||||
builder: (_, val, __) {
|
builder: (val) {
|
||||||
return _buildBody(val);
|
return _buildBody(val);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import 'package:toolbox/data/res/store.dart';
|
|||||||
import 'package:toolbox/view/widget/expand_tile.dart';
|
import 'package:toolbox/view/widget/expand_tile.dart';
|
||||||
import 'package:toolbox/view/widget/kv_row.dart';
|
import 'package:toolbox/view/widget/kv_row.dart';
|
||||||
import 'package:toolbox/view/widget/server_func_btns.dart';
|
import 'package:toolbox/view/widget/server_func_btns.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../../core/extension/numx.dart';
|
import '../../../../core/extension/numx.dart';
|
||||||
import '../../../../core/route.dart';
|
import '../../../../core/route.dart';
|
||||||
@@ -573,9 +574,9 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
children: [
|
children: [
|
||||||
Text(l10n.net),
|
Text(l10n.net),
|
||||||
UIs.width13,
|
UIs.width13,
|
||||||
ValueListenableBuilder(
|
ValBuilder(
|
||||||
valueListenable: _netSortType,
|
listenable: _netSortType,
|
||||||
builder: (_, val, __) => InkWell(
|
builder: (val) => InkWell(
|
||||||
onTap: () => _netSortType.value = val.next,
|
onTap: () => _netSortType.value = val.next,
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
duration: const Duration(milliseconds: 377),
|
duration: const Duration(milliseconds: 377),
|
||||||
|
|||||||
@@ -466,7 +466,10 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
));
|
));
|
||||||
return CardX(
|
return CardX(
|
||||||
child: ExpandTile(
|
child: ExpandTile(
|
||||||
leading: const Icon(Icons.map),
|
leading: const Padding(
|
||||||
|
padding: EdgeInsets.only(left: 10),
|
||||||
|
child: Icon(Icons.map),
|
||||||
|
),
|
||||||
initiallyExpanded: _jumpServer.value != null,
|
initiallyExpanded: _jumpServer.value != null,
|
||||||
title: Text(l10n.jumpServer),
|
title: Text(l10n.jumpServer),
|
||||||
children: children,
|
children: children,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:io';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_highlight/theme_map.dart';
|
import 'package:flutter_highlight/theme_map.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
|
import 'package:icons_plus/icons_plus.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:toolbox/core/build_mode.dart';
|
import 'package:toolbox/core/build_mode.dart';
|
||||||
import 'package:toolbox/core/extension/colorx.dart';
|
import 'package:toolbox/core/extension/colorx.dart';
|
||||||
@@ -19,6 +20,7 @@ import 'package:toolbox/data/res/rebuild.dart';
|
|||||||
import 'package:toolbox/data/res/store.dart';
|
import 'package:toolbox/data/res/store.dart';
|
||||||
import 'package:toolbox/view/widget/expand_tile.dart';
|
import 'package:toolbox/view/widget/expand_tile.dart';
|
||||||
import 'package:toolbox/view/widget/markdown.dart';
|
import 'package:toolbox/view/widget/markdown.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../core/persistant_store.dart';
|
import '../../../core/persistant_store.dart';
|
||||||
import '../../../core/route.dart';
|
import '../../../core/route.dart';
|
||||||
@@ -36,6 +38,8 @@ import '../../widget/input_field.dart';
|
|||||||
import '../../widget/cardx.dart';
|
import '../../widget/cardx.dart';
|
||||||
import '../../widget/store_switch.dart';
|
import '../../widget/store_switch.dart';
|
||||||
|
|
||||||
|
const _kIconSize = 23.0;
|
||||||
|
|
||||||
class SettingPage extends StatefulWidget {
|
class SettingPage extends StatefulWidget {
|
||||||
const SettingPage({super.key});
|
const SettingPage({super.key});
|
||||||
|
|
||||||
@@ -195,7 +199,10 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCheckUpdate() {
|
Widget _buildCheckUpdate() {
|
||||||
return Consumer<AppProvider>(
|
return ListTile(
|
||||||
|
leading: const Icon(Icons.update),
|
||||||
|
title: Text(l10n.autoCheckUpdate),
|
||||||
|
subtitle: Consumer<AppProvider>(
|
||||||
builder: (ctx, app, __) {
|
builder: (ctx, app, __) {
|
||||||
String display;
|
String display;
|
||||||
if (app.newestBuild != null) {
|
if (app.newestBuild != null) {
|
||||||
@@ -207,16 +214,14 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
} else {
|
} else {
|
||||||
display = l10n.versionUnknownUpdate(BuildData.build);
|
display = l10n.versionUnknownUpdate(BuildData.build);
|
||||||
}
|
}
|
||||||
return ListTile(
|
return Text(display, style: UIs.textGrey);
|
||||||
title: Text(l10n.autoCheckUpdate),
|
},
|
||||||
subtitle: Text(display, style: UIs.textGrey),
|
),
|
||||||
onTap: () => Funcs.throttle(
|
onTap: () => Funcs.throttle(
|
||||||
() => doUpdate(ctx, force: BuildMode.isDebug),
|
() => doUpdate(context, force: BuildMode.isDebug),
|
||||||
),
|
),
|
||||||
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate),
|
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate),
|
||||||
);
|
);
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildUpdateInterval() {
|
Widget _buildUpdateInterval() {
|
||||||
@@ -238,9 +243,9 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_setting.serverStatusUpdateInterval.put(val);
|
_setting.serverStatusUpdateInterval.put(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.serverStatusUpdateInterval.listenable(),
|
listenable: _setting.serverStatusUpdateInterval.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
'$val ${l10n.second}',
|
'$val ${l10n.second}',
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -250,14 +255,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildAppColor() {
|
Widget _buildAppColor() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
trailing: ClipOval(
|
leading: const Icon(Icons.colorize),
|
||||||
child: Container(
|
|
||||||
color: primaryColor,
|
|
||||||
height: 27,
|
|
||||||
width: 27,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: Text(l10n.primaryColorSeed),
|
title: Text(l10n.primaryColorSeed),
|
||||||
|
trailing: ClipOval(
|
||||||
|
child: Container(color: primaryColor, height: 27, width: 27),
|
||||||
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final ctrl = TextEditingController(text: primaryColor.toHex);
|
final ctrl = TextEditingController(text: primaryColor.toHex);
|
||||||
await context.showRoundDialog(
|
await context.showRoundDialog(
|
||||||
@@ -360,9 +362,9 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
Widget _buildMaxRetry() {
|
Widget _buildMaxRetry() {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: _setting.maxRetryCount.listenable(),
|
listenable: _setting.maxRetryCount.listenable(),
|
||||||
builder: (_, val, __) => ListTile(
|
builder: (val) => ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
l10n.maxRetryCount,
|
l10n.maxRetryCount,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
@@ -392,9 +394,8 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
// Issue #57
|
// Issue #57
|
||||||
final len = ThemeMode.values.length;
|
final len = ThemeMode.values.length;
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
leading: const Icon(MingCute.moon_stars_fill),
|
||||||
l10n.themeMode,
|
title: Text(l10n.themeMode),
|
||||||
),
|
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
items: List.generate(len + 2, (index) => index),
|
items: List.generate(len + 2, (index) => index),
|
||||||
@@ -406,9 +407,9 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
RebuildNodes.app.rebuild();
|
RebuildNodes.app.rebuild();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.themeMode.listenable(),
|
listenable: _setting.themeMode.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
_buildThemeModeStr(val),
|
_buildThemeModeStr(val),
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -434,6 +435,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
Widget _buildFont() {
|
Widget _buildFont() {
|
||||||
final fontName = getFileName(_setting.fontPath.fetch());
|
final fontName = getFileName(_setting.fontPath.fetch());
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.font_fill),
|
||||||
title: Text(l10n.font),
|
title: Text(l10n.font),
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
fontName ?? l10n.notSelected,
|
fontName ?? l10n.notSelected,
|
||||||
@@ -483,11 +485,12 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildTermFontSize() {
|
Widget _buildTermFontSize() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.font_size_line),
|
||||||
title: Text(l10n.fontSize),
|
title: Text(l10n.fontSize),
|
||||||
subtitle: Text(l10n.termFontSizeTip, style: UIs.textGrey),
|
subtitle: Text(l10n.termFontSizeTip, style: UIs.textGrey),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.termFontSize.listenable(),
|
listenable: _setting.termFontSize.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
val.toString(),
|
val.toString(),
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -535,6 +538,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildLocale() {
|
Widget _buildLocale() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(IonIcons.language),
|
||||||
title: Text(l10n.language),
|
title: Text(l10n.language),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
@@ -548,9 +552,9 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
RebuildNodes.app.rebuild();
|
RebuildNodes.app.rebuild();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ListenBuilder(
|
||||||
valueListenable: _setting.locale.listenable(),
|
listenable: _setting.locale.listenable(),
|
||||||
builder: (_, ___, __) => Text(
|
builder: () => Text(
|
||||||
l10n.languageName,
|
l10n.languageName,
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -560,6 +564,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildSSHVirtualKeyAutoOff() {
|
Widget _buildSSHVirtualKeyAutoOff() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.hotkey_fill),
|
||||||
title: Text(l10n.sshVirtualKeyAutoOff),
|
title: Text(l10n.sshVirtualKeyAutoOff),
|
||||||
subtitle: const Text('Ctrl & Alt', style: UIs.textGrey),
|
subtitle: const Text('Ctrl & Alt', style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.sshVirtualKeyAutoOff),
|
trailing: StoreSwitch(prop: _setting.sshVirtualKeyAutoOff),
|
||||||
@@ -568,10 +573,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildEditorTheme() {
|
Widget _buildEditorTheme() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.sun_fill),
|
||||||
title: Text('${l10n.light} ${l10n.theme.toLowerCase()}'),
|
title: Text('${l10n.light} ${l10n.theme.toLowerCase()}'),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.editorTheme.listenable(),
|
listenable: _setting.editorTheme.listenable(),
|
||||||
builder: (_, val, __) => Text(val, style: UIs.text15),
|
builder: (val) => Text(val, style: UIs.text15),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
@@ -588,10 +594,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildEditorDarkTheme() {
|
Widget _buildEditorDarkTheme() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.moon_stars_fill),
|
||||||
title: Text('${l10n.dark} ${l10n.theme.toLowerCase()}'),
|
title: Text('${l10n.dark} ${l10n.theme.toLowerCase()}'),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.editorDarkTheme.listenable(),
|
listenable: _setting.editorDarkTheme.listenable(),
|
||||||
builder: (_, val, __) => Text(val, style: UIs.text15),
|
builder: (val) => Text(val, style: UIs.text15),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
@@ -608,6 +615,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildFullScreenSwitch() {
|
Widget _buildFullScreenSwitch() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(Bootstrap.phone_landscape_fill),
|
||||||
title: Text(l10n.fullScreen),
|
title: Text(l10n.fullScreen),
|
||||||
subtitle: Text(l10n.fullScreenTip, style: UIs.textGrey),
|
subtitle: Text(l10n.fullScreenTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(
|
trailing: StoreSwitch(
|
||||||
@@ -619,6 +627,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildFullScreenJitter() {
|
Widget _buildFullScreenJitter() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(AntDesign.shake_outline),
|
||||||
title: Text(l10n.fullScreenJitter),
|
title: Text(l10n.fullScreenJitter),
|
||||||
subtitle: Text(l10n.fullScreenJitterHelp, style: UIs.textGrey),
|
subtitle: Text(l10n.fullScreenJitterHelp, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(
|
trailing: StoreSwitch(
|
||||||
@@ -673,6 +682,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildSSHVirtKeys() {
|
Widget _buildSSHVirtKeys() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(BoxIcons.bxs_keyboard),
|
||||||
title: Text(l10n.editVirtKeys),
|
title: Text(l10n.editVirtKeys),
|
||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
onTap: () => AppRoute.sshVirtKeySetting().go(context),
|
onTap: () => AppRoute.sshVirtKeySetting().go(context),
|
||||||
@@ -691,6 +701,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildSftpOpenLastPath() {
|
Widget _buildSftpOpenLastPath() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.history_line),
|
||||||
title: Text(l10n.openLastPath),
|
title: Text(l10n.openLastPath),
|
||||||
subtitle: Text(l10n.openLastPathTip, style: UIs.textGrey),
|
subtitle: Text(l10n.openLastPathTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.sftpOpenLastPath),
|
trailing: StoreSwitch(prop: _setting.sftpOpenLastPath),
|
||||||
@@ -699,6 +710,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildSftpShowFoldersFirst() {
|
Widget _buildSftpShowFoldersFirst() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.folder_fill),
|
||||||
title: Text(l10n.sftpShowFoldersFirst),
|
title: Text(l10n.sftpShowFoldersFirst),
|
||||||
trailing: StoreSwitch(prop: _setting.sftpShowFoldersFirst),
|
trailing: StoreSwitch(prop: _setting.sftpShowFoldersFirst),
|
||||||
);
|
);
|
||||||
@@ -706,10 +718,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildNetViewType() {
|
Widget _buildNetViewType() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(ZondIcons.network, size: _kIconSize),
|
||||||
title: Text(l10n.netViewType),
|
title: Text(l10n.netViewType),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.netViewType.listenable(),
|
listenable: _setting.netViewType.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
val.toStr,
|
val.toStr,
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -730,7 +743,8 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
Widget _buildDeleteServers() {
|
Widget _buildDeleteServers() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(l10n.deleteServers),
|
title: Text(l10n.deleteServers),
|
||||||
trailing: const Icon(Icons.delete_forever),
|
leading: const Icon(Icons.delete_forever),
|
||||||
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
context.showRoundDialog<List<String>>(
|
context.showRoundDialog<List<String>>(
|
||||||
title: Text(l10n.choose),
|
title: Text(l10n.choose),
|
||||||
@@ -775,9 +789,9 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(l10n.textScaler),
|
title: Text(l10n.textScaler),
|
||||||
subtitle: Text(l10n.textScalerTip, style: UIs.textGrey),
|
subtitle: Text(l10n.textScalerTip, style: UIs.textGrey),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.textFactor.listenable(),
|
listenable: _setting.textFactor.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
val.toString(),
|
val.toString(),
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -815,6 +829,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildServerFuncBtns() {
|
Widget _buildServerFuncBtns() {
|
||||||
return ExpandTile(
|
return ExpandTile(
|
||||||
|
leading: const Icon(TeenyIcons.button, size: _kIconSize),
|
||||||
title: Text(l10n.serverFuncBtns),
|
title: Text(l10n.serverFuncBtns),
|
||||||
children: [
|
children: [
|
||||||
_buildServerFuncBtnsSwitch(),
|
_buildServerFuncBtnsSwitch(),
|
||||||
@@ -841,6 +856,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildServerSeq() {
|
Widget _buildServerSeq() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(OctIcons.sort_desc, size: _kIconSize),
|
||||||
title: Text(l10n.serverOrder),
|
title: Text(l10n.serverOrder),
|
||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
onTap: () => AppRoute.serverOrder().go(context),
|
onTap: () => AppRoute.serverOrder().go(context),
|
||||||
@@ -849,6 +865,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildServerDetailCardSeq() {
|
Widget _buildServerDetailCardSeq() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(OctIcons.sort_desc, size: _kIconSize),
|
||||||
title: Text(l10n.serverDetailOrder),
|
title: Text(l10n.serverDetailOrder),
|
||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
onTap: () => AppRoute.serverDetailOrder().go(context),
|
onTap: () => AppRoute.serverDetailOrder().go(context),
|
||||||
@@ -857,10 +874,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildEditorFontSize() {
|
Widget _buildEditorFontSize() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.font_size_line),
|
||||||
title: Text(l10n.fontSize),
|
title: Text(l10n.fontSize),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.editorFontSize.listenable(),
|
listenable: _setting.editorFontSize.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
val.toString(),
|
val.toString(),
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -904,6 +922,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildSftpRmrDir() {
|
Widget _buildSftpRmrDir() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.delete_2_fill),
|
||||||
title: const Text('rm -r'),
|
title: const Text('rm -r'),
|
||||||
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
|
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
|
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
|
||||||
@@ -926,6 +945,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
};
|
};
|
||||||
if (func == null) return null;
|
if (func == null) return null;
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(Icons.phone_android),
|
||||||
title: Text('${OS.type} ${l10n.setting}'),
|
title: Text('${OS.type} ${l10n.setting}'),
|
||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
onTap: () => func(context),
|
onTap: () => func(context),
|
||||||
@@ -934,6 +954,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildEditorHighlight() {
|
Widget _buildEditorHighlight() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.code_line, size: _kIconSize),
|
||||||
title: Text(l10n.highlight),
|
title: Text(l10n.highlight),
|
||||||
subtitle: Text(l10n.editorHighlightTip, style: UIs.textGrey),
|
subtitle: Text(l10n.editorHighlightTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.editorHighlight),
|
trailing: StoreSwitch(prop: _setting.editorHighlight),
|
||||||
@@ -950,6 +971,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildUsePodman() {
|
Widget _buildUsePodman() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(IonIcons.logo_docker),
|
||||||
title: Text(l10n.usePodmanByDefault),
|
title: Text(l10n.usePodmanByDefault),
|
||||||
trailing: StoreSwitch(prop: _setting.usePodman),
|
trailing: StoreSwitch(prop: _setting.usePodman),
|
||||||
);
|
);
|
||||||
@@ -957,6 +979,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildContainerTrySudo() {
|
Widget _buildContainerTrySudo() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(Clarity.administrator_solid),
|
||||||
title: Text(l10n.trySudo),
|
title: Text(l10n.trySudo),
|
||||||
subtitle: Text(l10n.containerTrySudoTip, style: UIs.textGrey),
|
subtitle: Text(l10n.containerTrySudoTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.containerTrySudo),
|
trailing: StoreSwitch(prop: _setting.containerTrySudo),
|
||||||
@@ -973,6 +996,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildContainerParseStat() {
|
Widget _buildContainerParseStat() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(IonIcons.stats_chart, size: _kIconSize),
|
||||||
title: Text(l10n.parseContainerStats),
|
title: Text(l10n.parseContainerStats),
|
||||||
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
|
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.containerParseStat),
|
trailing: StoreSwitch(prop: _setting.containerParseStat),
|
||||||
@@ -981,6 +1005,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildServerMore() {
|
Widget _buildServerMore() {
|
||||||
return ExpandTile(
|
return ExpandTile(
|
||||||
|
leading: const Icon(MingCute.more_3_fill),
|
||||||
title: Text(l10n.more),
|
title: Text(l10n.more),
|
||||||
children: [
|
children: [
|
||||||
_buildRememberPwdInMem(),
|
_buildRememberPwdInMem(),
|
||||||
@@ -1016,10 +1041,11 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.moon_stars_fill, size: _kIconSize),
|
||||||
title: Text(l10n.theme),
|
title: Text(l10n.theme),
|
||||||
trailing: ValueListenableBuilder(
|
trailing: ValBuilder(
|
||||||
valueListenable: _setting.termTheme.listenable(),
|
listenable: _setting.termTheme.listenable(),
|
||||||
builder: (_, val, __) => Text(
|
builder: (val) => Text(
|
||||||
index2Str(val),
|
index2Str(val),
|
||||||
style: UIs.text15,
|
style: UIs.text15,
|
||||||
),
|
),
|
||||||
@@ -1039,6 +1065,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildAppMore() {
|
Widget _buildAppMore() {
|
||||||
return ExpandTile(
|
return ExpandTile(
|
||||||
|
leading: const Icon(MingCute.more_3_fill),
|
||||||
title: Text(l10n.more),
|
title: Text(l10n.more),
|
||||||
children: [
|
children: [
|
||||||
if (isAndroid || isIOS) _buildCollectUsage(),
|
if (isAndroid || isIOS) _buildCollectUsage(),
|
||||||
@@ -1065,6 +1092,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildCpuView() {
|
Widget _buildCpuView() {
|
||||||
return ExpandTile(
|
return ExpandTile(
|
||||||
|
leading: const Icon(OctIcons.cpu, size: _kIconSize),
|
||||||
title: Text('CPU ${l10n.view}'),
|
title: Text('CPU ${l10n.view}'),
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -1082,6 +1110,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
Widget _buildEditorWrap() {
|
Widget _buildEditorWrap() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
leading: const Icon(MingCute.align_center_line),
|
||||||
title: Text(l10n.softWrap),
|
title: Text(l10n.softWrap),
|
||||||
trailing: StoreSwitch(prop: _setting.editorSoftWrap),
|
trailing: StoreSwitch(prop: _setting.editorSoftWrap),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:toolbox/core/extension/context/locale.dart';
|
|||||||
import 'package:toolbox/core/extension/context/snackbar.dart';
|
import 'package:toolbox/core/extension/context/snackbar.dart';
|
||||||
import 'package:toolbox/data/model/app/server_detail_card.dart';
|
import 'package:toolbox/data/model/app/server_detail_card.dart';
|
||||||
import 'package:toolbox/data/res/store.dart';
|
import 'package:toolbox/data/res/store.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../../core/extension/order.dart';
|
import '../../../../core/extension/order.dart';
|
||||||
import '../../../widget/appbar.dart';
|
import '../../../widget/appbar.dart';
|
||||||
@@ -29,9 +30,9 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody() {
|
Widget _buildBody() {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: prop.listenable(),
|
listenable: prop.listenable(),
|
||||||
builder: (_, keys, __) {
|
builder: (keys) {
|
||||||
final disabled =
|
final disabled =
|
||||||
ServerDetailCards.names.where((e) => !keys.contains(e)).toList();
|
ServerDetailCards.names.where((e) => !keys.contains(e)).toList();
|
||||||
final allKeys = [...keys, ...disabled];
|
final allKeys = [...keys, ...disabled];
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:toolbox/core/extension/context/snackbar.dart';
|
|||||||
import 'package:toolbox/data/model/app/menu/server_func.dart';
|
import 'package:toolbox/data/model/app/menu/server_func.dart';
|
||||||
import 'package:toolbox/data/res/store.dart';
|
import 'package:toolbox/data/res/store.dart';
|
||||||
import 'package:toolbox/data/res/ui.dart';
|
import 'package:toolbox/data/res/ui.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../../core/extension/order.dart';
|
import '../../../../core/extension/order.dart';
|
||||||
import '../../../widget/appbar.dart';
|
import '../../../widget/appbar.dart';
|
||||||
@@ -30,9 +31,9 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody() {
|
Widget _buildBody() {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: prop.listenable(),
|
listenable: prop.listenable(),
|
||||||
builder: (_, keys, __) {
|
builder: (keys) {
|
||||||
final disabled = ServerFuncBtn.values
|
final disabled = ServerFuncBtn.values
|
||||||
.map((e) => e.index)
|
.map((e) => e.index)
|
||||||
.where((e) => !keys.contains(e))
|
.where((e) => !keys.contains(e))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:toolbox/data/res/store.dart';
|
|||||||
import 'package:toolbox/data/res/ui.dart';
|
import 'package:toolbox/data/res/ui.dart';
|
||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
import 'package:toolbox/view/widget/store_switch.dart';
|
import 'package:toolbox/view/widget/store_switch.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../widget/appbar.dart';
|
import '../../../widget/appbar.dart';
|
||||||
|
|
||||||
@@ -48,9 +49,9 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody() {
|
Widget _buildBody() {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: prop.listenable(),
|
listenable: prop.listenable(),
|
||||||
builder: (_, keys, __) {
|
builder: (keys) {
|
||||||
final disabled = VirtKey.values
|
final disabled = VirtKey.values
|
||||||
.map((e) => e.index)
|
.map((e) => e.index)
|
||||||
.where((e) => !keys.contains(e))
|
.where((e) => !keys.contains(e))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:toolbox/data/res/provider.dart';
|
|||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
import 'package:toolbox/view/widget/input_field.dart';
|
import 'package:toolbox/view/widget/input_field.dart';
|
||||||
import 'package:toolbox/view/widget/markdown.dart';
|
import 'package:toolbox/view/widget/markdown.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../data/model/server/snippet.dart';
|
import '../../../data/model/server/snippet.dart';
|
||||||
import '../../../data/res/ui.dart';
|
import '../../../data/res/ui.dart';
|
||||||
@@ -132,9 +133,9 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
label: l10n.note,
|
label: l10n.note,
|
||||||
icon: Icons.note,
|
icon: Icons.note,
|
||||||
),
|
),
|
||||||
ValueListenableBuilder(
|
ValBuilder(
|
||||||
valueListenable: _tags,
|
listenable: _tags,
|
||||||
builder: (_, vals, __) {
|
builder: (vals) {
|
||||||
return TagEditor(
|
return TagEditor(
|
||||||
tags: _tags.value,
|
tags: _tags.value,
|
||||||
onChanged: (p0) => setState(() {
|
onChanged: (p0) => setState(() {
|
||||||
@@ -164,9 +165,9 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
|
|
||||||
Widget _buildAutoRunOn() {
|
Widget _buildAutoRunOn() {
|
||||||
return CardX(
|
return CardX(
|
||||||
child: ValueListenableBuilder(
|
child: ValBuilder(
|
||||||
valueListenable: _autoRunOn,
|
listenable: _autoRunOn,
|
||||||
builder: (_, vals, __) {
|
builder: (vals) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: const Icon(Icons.settings_remote, size: 19),
|
leading: const Icon(Icons.settings_remote, size: 19),
|
||||||
title: Text(l10n.autoRun),
|
title: Text(l10n.autoRun),
|
||||||
@@ -190,7 +191,8 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTip() {
|
Widget _buildTip() {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import 'package:toolbox/data/res/provider.dart';
|
|||||||
import 'package:toolbox/view/widget/input_field.dart';
|
import 'package:toolbox/view/widget/input_field.dart';
|
||||||
import 'package:toolbox/view/widget/omit_start_text.dart';
|
import 'package:toolbox/view/widget/omit_start_text.dart';
|
||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../core/extension/numx.dart';
|
import '../../../core/extension/numx.dart';
|
||||||
import '../../../core/route.dart';
|
import '../../../core/route.dart';
|
||||||
@@ -76,9 +77,9 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
|
|||||||
icon: const Icon(Icons.downloading),
|
icon: const Icon(Icons.downloading),
|
||||||
onPressed: () => AppRoute.sftpMission().go(context),
|
onPressed: () => AppRoute.sftpMission().go(context),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<_SortType>(
|
ValBuilder<_SortType>(
|
||||||
valueListenable: _sortType,
|
listenable: _sortType,
|
||||||
builder: (context, value, child) {
|
builder: (value) {
|
||||||
return PopupMenuButton<_SortType>(
|
return PopupMenuButton<_SortType>(
|
||||||
icon: const Icon(Icons.sort),
|
icon: const Icon(Icons.sort),
|
||||||
itemBuilder: (context) {
|
itemBuilder: (context) {
|
||||||
@@ -107,9 +108,9 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
|
|||||||
),
|
),
|
||||||
body: FadeIn(
|
body: FadeIn(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
child: ValueListenableBuilder(
|
child: ValBuilder(
|
||||||
valueListenable: _sortType,
|
listenable: _sortType,
|
||||||
builder: (_, val, __) {
|
builder: (val) {
|
||||||
return _buildBody();
|
return _buildBody();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import 'package:toolbox/data/res/provider.dart';
|
|||||||
import 'package:toolbox/data/res/store.dart';
|
import 'package:toolbox/data/res/store.dart';
|
||||||
import 'package:toolbox/view/widget/omit_start_text.dart';
|
import 'package:toolbox/view/widget/omit_start_text.dart';
|
||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../../core/extension/numx.dart';
|
import '../../../core/extension/numx.dart';
|
||||||
import '../../../core/route.dart';
|
import '../../../core/route.dart';
|
||||||
@@ -72,9 +73,9 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
icon: const Icon(Icons.downloading),
|
icon: const Icon(Icons.downloading),
|
||||||
onPressed: () => AppRoute.sftpMission().go(context),
|
onPressed: () => AppRoute.sftpMission().go(context),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder(
|
ValBuilder(
|
||||||
valueListenable: _sortOption,
|
listenable: _sortOption,
|
||||||
builder: (context, value, child) {
|
builder: (value) {
|
||||||
return PopupMenuButton<_SortType>(
|
return PopupMenuButton<_SortType>(
|
||||||
icon: const Icon(Icons.sort),
|
icon: const Icon(Icons.sort),
|
||||||
itemBuilder: (context) {
|
itemBuilder: (context) {
|
||||||
@@ -294,11 +295,13 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
return RefreshIndicator(
|
return RefreshIndicator(
|
||||||
child: FadeIn(
|
child: FadeIn(
|
||||||
key: Key(widget.spi.name + _status.path!.path),
|
key: Key(widget.spi.name + _status.path!.path),
|
||||||
child: ValueListenableBuilder(
|
child: ValBuilder(
|
||||||
valueListenable: _sortOption,
|
listenable: _sortOption,
|
||||||
builder: (_, sortOption, __) {
|
builder: (sortOption) {
|
||||||
final files = sortOption.sortBy
|
final files = sortOption.sortBy.sort(
|
||||||
.sort(_status.files!, reversed: sortOption.reversed);
|
_status.files!,
|
||||||
|
reversed: sortOption.reversed,
|
||||||
|
);
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: files.length,
|
itemCount: files.length,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 3),
|
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 3),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../core/persistant_store.dart';
|
import '../../core/persistant_store.dart';
|
||||||
|
|
||||||
@@ -22,9 +23,9 @@ class StoreSwitch extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: prop.listenable(),
|
listenable: prop.listenable(),
|
||||||
builder: (context, bool value, widget) {
|
builder: (value) {
|
||||||
return Switch(
|
return Switch(
|
||||||
value: value,
|
value: value,
|
||||||
onChanged: (value) async {
|
onChanged: (value) async {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:toolbox/core/extension/context/locale.dart';
|
|||||||
import 'package:toolbox/data/res/ui.dart';
|
import 'package:toolbox/data/res/ui.dart';
|
||||||
import 'package:toolbox/view/widget/input_field.dart';
|
import 'package:toolbox/view/widget/input_field.dart';
|
||||||
import 'package:toolbox/view/widget/cardx.dart';
|
import 'package:toolbox/view/widget/cardx.dart';
|
||||||
|
import 'package:toolbox/view/widget/val_builder.dart';
|
||||||
|
|
||||||
import '../../data/res/color.dart';
|
import '../../data/res/color.dart';
|
||||||
|
|
||||||
@@ -196,9 +197,9 @@ class TagSwitcher extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ValueListenableBuilder(
|
return ValBuilder(
|
||||||
valueListenable: tags,
|
listenable: tags,
|
||||||
builder: (_, vals, __) {
|
builder: (vals) {
|
||||||
if (vals.isEmpty) return UIs.placeholder;
|
if (vals.isEmpty) return UIs.placeholder;
|
||||||
final items = <String?>[null, ...vals];
|
final items = <String?>[null, ...vals];
|
||||||
return Container(
|
return Container(
|
||||||
|
|||||||
35
lib/view/widget/val_builder.dart
Normal file
35
lib/view/widget/val_builder.dart
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
final class ValBuilder<T> extends ValueListenableBuilder<T> {
|
||||||
|
ValBuilder({
|
||||||
|
super.key,
|
||||||
|
required ValueListenable<T> listenable,
|
||||||
|
required Widget Function(T) builder,
|
||||||
|
}) : super(
|
||||||
|
valueListenable: listenable,
|
||||||
|
builder: (_, val, __) => builder(val),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final class ValChildBuilder<T> extends ValueListenableBuilder<T> {
|
||||||
|
ValChildBuilder({
|
||||||
|
super.key,
|
||||||
|
required ValueListenable<T> listenable,
|
||||||
|
required Widget Function(T, Widget?) builder,
|
||||||
|
super.child,
|
||||||
|
}) : super(
|
||||||
|
valueListenable: listenable,
|
||||||
|
builder: (_, val, child) => builder(val, child),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final class ListenBuilder extends ListenableBuilder {
|
||||||
|
ListenBuilder({
|
||||||
|
super.key,
|
||||||
|
required super.listenable,
|
||||||
|
required Widget Function() builder,
|
||||||
|
}) : super(
|
||||||
|
builder: (_, __) => builder(),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -471,7 +471,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
||||||
@@ -481,7 +481,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@@ -638,7 +638,7 @@
|
|||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 872;
|
CURRENT_PROJECT_VERSION = 873;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
|
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -649,7 +649,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.872;
|
MARKETING_VERSION = 1.0.873;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user