opt.: TagSwitcher related
This commit is contained in:
@@ -44,7 +44,7 @@ final class _IntroPage extends StatelessWidget {
|
|||||||
final selected = await ctx.showPickSingleDialog(
|
final selected = await ctx.showPickSingleDialog(
|
||||||
title: libL10n.language,
|
title: libL10n.language,
|
||||||
items: AppLocalizations.supportedLocales,
|
items: AppLocalizations.supportedLocales,
|
||||||
name: (p0) => p0.nativeName,
|
display: (p0) => p0.nativeName,
|
||||||
initial: _setting.locale.fetch().toLocale,
|
initial: _setting.locale.fetch().toLocale,
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:choice/choice.dart';
|
||||||
import 'package:fl_lib/fl_lib.dart';
|
import 'package:fl_lib/fl_lib.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:icons_plus/icons_plus.dart';
|
import 'package:icons_plus/icons_plus.dart';
|
||||||
import 'package:server_box/core/extension/context/locale.dart';
|
import 'package:server_box/core/extension/context/locale.dart';
|
||||||
import 'package:server_box/data/model/server/custom.dart';
|
import 'package:server_box/data/model/server/custom.dart';
|
||||||
|
import 'package:server_box/data/model/server/server.dart';
|
||||||
import 'package:server_box/data/model/server/wol_cfg.dart';
|
import 'package:server_box/data/model/server/wol_cfg.dart';
|
||||||
import 'package:server_box/data/provider/server.dart';
|
import 'package:server_box/data/provider/server.dart';
|
||||||
|
|
||||||
@@ -45,7 +47,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
|
|
||||||
final _keyIdx = ValueNotifier<int?>(null);
|
final _keyIdx = ValueNotifier<int?>(null);
|
||||||
final _autoConnect = ValueNotifier(true);
|
final _autoConnect = ValueNotifier(true);
|
||||||
final _jumpServer = ValueNotifier<String?>(null);
|
final _jumpServer = nvn<String?>();
|
||||||
final _pveIgnoreCert = ValueNotifier(false);
|
final _pveIgnoreCert = ValueNotifier(false);
|
||||||
final _env = <String, String>{}.vn;
|
final _env = <String, String>{}.vn;
|
||||||
final _customCmds = <String, String>{}.vn;
|
final _customCmds = <String, String>{}.vn;
|
||||||
@@ -217,16 +219,16 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildKeyAuth() {
|
Widget _buildKeyAuth() {
|
||||||
const padding = EdgeInsets.only(left: 23, right: 13);
|
|
||||||
return PrivateKeyProvider.pkis.listenVal(
|
return PrivateKeyProvider.pkis.listenVal(
|
||||||
(pkis) {
|
(pkis) {
|
||||||
final tiles = List<Widget>.generate(pkis.length, (index) {
|
final tiles = List<Widget>.generate(pkis.length, (index) {
|
||||||
final e = pkis[index];
|
final e = pkis[index];
|
||||||
return ListTile(
|
return ListTile(
|
||||||
contentPadding: padding,
|
contentPadding: const EdgeInsets.only(left: 10, right: 15),
|
||||||
leading: Text(
|
leading: Radio<int>(
|
||||||
'#${index + 1}',
|
value: index,
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
groupValue: _keyIdx.value,
|
||||||
|
onChanged: (value) => _keyIdx.value = value,
|
||||||
),
|
),
|
||||||
title: Text(e.id, textAlign: TextAlign.start),
|
title: Text(e.id, textAlign: TextAlign.start),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
@@ -234,10 +236,9 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: UIs.textGrey,
|
style: UIs.textGrey,
|
||||||
),
|
),
|
||||||
trailing: Radio<int>(
|
trailing: Btn.icon(
|
||||||
value: index,
|
icon: const Icon(Icons.edit),
|
||||||
groupValue: _keyIdx.value,
|
onTap: () => AppRoutes.keyEdit(pki: e).go(context),
|
||||||
onChanged: (value) => _keyIdx.value = value,
|
|
||||||
),
|
),
|
||||||
onTap: () => _keyIdx.value = index,
|
onTap: () => _keyIdx.value = index,
|
||||||
);
|
);
|
||||||
@@ -245,11 +246,8 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(libL10n.add),
|
title: Text(libL10n.add),
|
||||||
contentPadding: padding,
|
contentPadding: const EdgeInsets.only(left: 23, right: 23),
|
||||||
trailing: const Padding(
|
trailing: const Icon(Icons.add),
|
||||||
padding: EdgeInsets.only(right: 13),
|
|
||||||
child: Icon(Icons.add),
|
|
||||||
),
|
|
||||||
onTap: () => AppRoutes.keyEdit().go(context),
|
onTap: () => AppRoutes.keyEdit().go(context),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -433,43 +431,49 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildJumpServer() {
|
Widget _buildJumpServer() {
|
||||||
return ListenableBuilder(
|
const padding = EdgeInsets.only(left: 13, right: 13, bottom: 7);
|
||||||
listenable: _jumpServer,
|
final srvs = ServerProvider.servers.values
|
||||||
builder: (_, __) {
|
.map((e) => e.value)
|
||||||
final children = ServerProvider.servers.values
|
.where((e) => e.spi.jumpId == null)
|
||||||
.map((e) => e.value)
|
.where((e) => e.spi.id != widget.spi?.id)
|
||||||
.where((e) => e.spi.jumpId == null)
|
.toList();
|
||||||
.where((e) => e.spi.id != widget.spi?.id)
|
final choice = _jumpServer.listenVal(
|
||||||
.map(
|
(val) {
|
||||||
(e) => ListTile(
|
final srv = srvs.firstWhereOrNull((e) => e.id == _jumpServer.value);
|
||||||
title: Text(e.spi.name),
|
return Choice<Server>(
|
||||||
subtitle: Text(e.spi.id, style: UIs.textGrey),
|
multiple: false,
|
||||||
trailing: Radio<String>(
|
clearable: true,
|
||||||
groupValue: _jumpServer.value,
|
value: srv != null ? [srv] : [],
|
||||||
value: e.spi.id,
|
builder: (state, _) => Wrap(
|
||||||
onChanged: (val) => _jumpServer.value = val,
|
children: List<Widget>.generate(
|
||||||
),
|
srvs.length,
|
||||||
onTap: () => _jumpServer.value = e.spi.id,
|
(index) {
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
|
final item = srvs[index];
|
||||||
),
|
return ChoiceChipX<Server>(
|
||||||
)
|
label: item.spi.name,
|
||||||
.toList();
|
state: state,
|
||||||
children.add(ListTile(
|
value: item,
|
||||||
title: Text(libL10n.clear),
|
onSelected: (srv, on) {
|
||||||
trailing: const Icon(Icons.clear),
|
if (on) {
|
||||||
onTap: () => _jumpServer.value = null,
|
_jumpServer.value = srv.spi.id;
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
|
} else {
|
||||||
));
|
_jumpServer.value = null;
|
||||||
return CardX(
|
}
|
||||||
child: ExpandTile(
|
},
|
||||||
leading: const Icon(Icons.map),
|
);
|
||||||
initiallyExpanded: _jumpServer.value != null,
|
},
|
||||||
title: Text(l10n.jumpServer),
|
),
|
||||||
children: children,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
return ExpandTile(
|
||||||
|
leading: const Icon(Icons.map),
|
||||||
|
initiallyExpanded: _jumpServer.value != null,
|
||||||
|
childrenPadding: padding,
|
||||||
|
title: Text(l10n.jumpServer),
|
||||||
|
children: [choice],
|
||||||
|
).cardx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onSave() async {
|
void _onSave() async {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
|
|
||||||
Timer? _timer;
|
Timer? _timer;
|
||||||
|
|
||||||
String? _tag;
|
final _tag = ''.vn;
|
||||||
bool _useDoubleColumn = false;
|
bool _useDoubleColumn = false;
|
||||||
|
|
||||||
final _scrollController = ScrollController();
|
final _scrollController = ScrollController();
|
||||||
@@ -84,7 +84,11 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
|
|
||||||
Widget _buildPortrait() {
|
Widget _buildPortrait() {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: _buildTagsSwitcher(),
|
appBar: TagSwitcher(
|
||||||
|
tags: ServerProvider.tags,
|
||||||
|
onTagChanged: (p0) => _tag.value = p0,
|
||||||
|
tag: _tag,
|
||||||
|
),
|
||||||
body: GestureDetector(
|
body: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () => _autoHideKey.currentState?.show(),
|
onTap: () => _autoHideKey.currentState?.show(),
|
||||||
@@ -182,36 +186,26 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
Widget _buildBody() {
|
Widget _buildBody() {
|
||||||
return ServerProvider.serverOrder.listenVal(
|
return ServerProvider.serverOrder.listenVal(
|
||||||
(order) {
|
(order) {
|
||||||
if (!ServerProvider.tags.value.contains(_tag)) {
|
|
||||||
_tag = null;
|
|
||||||
}
|
|
||||||
if (order.isEmpty) {
|
if (order.isEmpty) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(libL10n.empty, textAlign: TextAlign.center),
|
child: Text(libL10n.empty, textAlign: TextAlign.center),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final filtered = _filterServers(order);
|
return _tag.listenVal(
|
||||||
if (_useDoubleColumn &&
|
(val) {
|
||||||
Stores.setting.doubleColumnServersPage.fetch()) {
|
final filtered = _filterServers(order);
|
||||||
return _buildBodyMedium(filtered);
|
if (_useDoubleColumn &&
|
||||||
}
|
Stores.setting.doubleColumnServersPage.fetch()) {
|
||||||
return _buildBodySmall(filtered: filtered);
|
return _buildBodyMedium(filtered);
|
||||||
|
}
|
||||||
|
return _buildBodySmall(filtered: filtered);
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TagSwitcher _buildTagsSwitcher() {
|
|
||||||
return TagSwitcher(
|
|
||||||
tags: ServerProvider.tags,
|
|
||||||
width: _media.size.width,
|
|
||||||
onTagChanged: (p0) => setState(() {
|
|
||||||
_tag = p0;
|
|
||||||
}),
|
|
||||||
initTag: _tag,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildBodySmall({
|
Widget _buildBodySmall({
|
||||||
required List<String> filtered,
|
required List<String> filtered,
|
||||||
EdgeInsets? padding = const EdgeInsets.fromLTRB(7, 0, 7, 7),
|
EdgeInsets? padding = const EdgeInsets.fromLTRB(7, 0, 7, 7),
|
||||||
@@ -259,7 +253,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
return CardX(
|
return CardX(
|
||||||
key: Key(srv.spi.id + (_tag ?? '')),
|
key: Key(srv.spi.id + _tag.value),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (srv.canViewDetails) {
|
if (srv.canViewDetails) {
|
||||||
@@ -651,11 +645,15 @@ ${ss.err?.message ?? 'null'}
|
|||||||
ServerProvider.startAutoRefresh();
|
ServerProvider.startAutoRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> _filterServers(List<String> order) => order
|
List<String> _filterServers(List<String> order) {
|
||||||
.where((e) =>
|
final tag = _tag.value;
|
||||||
_tag == null ||
|
if (tag.isEmpty) return order;
|
||||||
(ServerProvider.pick(id: e)?.value.spi.tags?.contains(_tag) ?? false))
|
return order.where((e) {
|
||||||
.toList();
|
final tags = ServerProvider.pick(id: e)?.value.spi.tags;
|
||||||
|
if (tags == null) return false;
|
||||||
|
return tags.contains(tag);
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
static const _kCardHeightMin = 23.0;
|
static const _kCardHeightMin = 23.0;
|
||||||
static const _kCardHeightFlip = 99.0;
|
static const _kCardHeightFlip = 99.0;
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
title: libL10n.setting,
|
title: libL10n.setting,
|
||||||
items: List.generate(10, (idx) => idx == 1 ? null : idx),
|
items: List.generate(10, (idx) => idx == 1 ? null : idx),
|
||||||
initial: _setting.serverStatusUpdateInterval.fetch(),
|
initial: _setting.serverStatusUpdateInterval.fetch(),
|
||||||
name: (p0) => p0 == 0 ? l10n.manual : '$p0 ${l10n.second}',
|
display: (p0) => p0 == 0 ? l10n.manual : '$p0 ${l10n.second}',
|
||||||
);
|
);
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
_setting.serverStatusUpdateInterval.put(val);
|
_setting.serverStatusUpdateInterval.put(val);
|
||||||
@@ -331,7 +331,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: l10n.maxRetryCount,
|
title: l10n.maxRetryCount,
|
||||||
items: List.generate(10, (index) => index),
|
items: List.generate(10, (index) => index),
|
||||||
name: (p0) => '$p0 ${l10n.times}',
|
display: (p0) => '$p0 ${l10n.times}',
|
||||||
initial: val,
|
initial: val,
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -356,7 +356,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: libL10n.themeMode,
|
title: libL10n.themeMode,
|
||||||
items: List.generate(len + 2, (index) => index),
|
items: List.generate(len + 2, (index) => index),
|
||||||
name: (p0) => _buildThemeModeStr(p0),
|
display: (p0) => _buildThemeModeStr(p0),
|
||||||
initial: _setting.themeMode.fetch(),
|
initial: _setting.themeMode.fetch(),
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -503,7 +503,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: libL10n.language,
|
title: libL10n.language,
|
||||||
items: AppLocalizations.supportedLocales,
|
items: AppLocalizations.supportedLocales,
|
||||||
name: (p0) => p0.nativeName,
|
display: (p0) => p0.nativeName,
|
||||||
initial: _setting.locale.fetch().toLocale,
|
initial: _setting.locale.fetch().toLocale,
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -543,7 +543,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: l10n.theme,
|
title: l10n.theme,
|
||||||
items: themeMap.keys.toList(),
|
items: themeMap.keys.toList(),
|
||||||
name: (p0) => p0,
|
display: (p0) => p0,
|
||||||
initial: _setting.editorTheme.fetch(),
|
initial: _setting.editorTheme.fetch(),
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -565,7 +565,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: l10n.theme,
|
title: l10n.theme,
|
||||||
items: themeMap.keys.toList(),
|
items: themeMap.keys.toList(),
|
||||||
name: (p0) => p0,
|
display: (p0) => p0,
|
||||||
initial: _setting.editorDarkTheme.fetch(),
|
initial: _setting.editorDarkTheme.fetch(),
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -688,7 +688,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: l10n.netViewType,
|
title: l10n.netViewType,
|
||||||
items: NetViewType.values,
|
items: NetViewType.values,
|
||||||
name: (p0) => p0.toStr,
|
display: (p0) => p0.toStr,
|
||||||
initial: _setting.netViewType.fetch(),
|
initial: _setting.netViewType.fetch(),
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
@@ -997,7 +997,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
final selected = await context.showPickSingleDialog(
|
final selected = await context.showPickSingleDialog(
|
||||||
title: l10n.theme,
|
title: l10n.theme,
|
||||||
items: List.generate(3, (index) => index),
|
items: List.generate(3, (index) => index),
|
||||||
name: (p0) => index2Str(p0),
|
display: (p0) => index2Str(p0),
|
||||||
initial: _setting.termTheme.fetch(),
|
initial: _setting.termTheme.fetch(),
|
||||||
);
|
);
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
final serverIds = await context.showPickDialog(
|
final serverIds = await context.showPickDialog(
|
||||||
title: l10n.autoRun,
|
title: l10n.autoRun,
|
||||||
items: ServerProvider.serverOrder.value,
|
items: ServerProvider.serverOrder.value,
|
||||||
name: (e) => ServerProvider.pick(id: e)?.value.spi.name ?? e,
|
display: (e) => ServerProvider.pick(id: e)?.value.spi.name ?? e,
|
||||||
initial: vals,
|
initial: vals,
|
||||||
clearable: true,
|
clearable: true,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,19 +14,16 @@ class SnippetListPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SnippetListPageState extends State<SnippetListPage> {
|
class _SnippetListPageState extends State<SnippetListPage> {
|
||||||
late MediaQueryData _media;
|
final _tag = ''.vn;
|
||||||
|
|
||||||
String? _tag;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void didChangeDependencies() {
|
|
||||||
super.didChangeDependencies();
|
|
||||||
_media = MediaQuery.of(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
appBar: TagSwitcher(
|
||||||
|
tags: SnippetProvider.tags,
|
||||||
|
onTagChanged: (tag) => _tag.value = tag,
|
||||||
|
tag: _tag,
|
||||||
|
),
|
||||||
body: _buildBody(),
|
body: _buildBody(),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
heroTag: 'snippetAdd',
|
heroTag: 'snippetAdd',
|
||||||
@@ -43,40 +40,38 @@ class _SnippetListPageState extends State<SnippetListPage> {
|
|||||||
return Center(child: Text(libL10n.empty));
|
return Center(child: Text(libL10n.empty));
|
||||||
}
|
}
|
||||||
|
|
||||||
final filtered = snippets
|
return _tag.listenVal((tag) => _buildSnippetList(snippets, tag));
|
||||||
.where((e) => _tag == null || (e.tags?.contains(_tag) ?? false))
|
},
|
||||||
.toList();
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return ReorderableListView.builder(
|
Widget _buildSnippetList(List<Snippet> snippets, String tag) {
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 11),
|
final filtered = tag.isEmpty
|
||||||
itemCount: filtered.length,
|
? snippets
|
||||||
onReorder: (oldIdx, newIdx) => setState(() {
|
: snippets.where((e) => e.tags?.contains(tag) ?? false).toList();
|
||||||
snippets.moveByItem(
|
|
||||||
oldIdx,
|
return ReorderableListView.builder(
|
||||||
newIdx,
|
padding: const EdgeInsets.symmetric(horizontal: 11),
|
||||||
filtered: filtered,
|
itemCount: filtered.length,
|
||||||
onMove: (p0) {
|
onReorder: (oldIdx, newIdx) => setState(() {
|
||||||
Stores.setting.snippetOrder.put(p0.map((e) => e.name).toList());
|
snippets.moveByItem(
|
||||||
},
|
oldIdx,
|
||||||
);
|
newIdx,
|
||||||
}),
|
filtered: filtered,
|
||||||
header: TagSwitcher(
|
onMove: (p0) {
|
||||||
tags: SnippetProvider.tags,
|
Stores.setting.snippetOrder.put(p0.map((e) => e.name).toList());
|
||||||
onTagChanged: (tag) => setState(() => _tag = tag),
|
|
||||||
initTag: _tag,
|
|
||||||
width: _media.size.width,
|
|
||||||
),
|
|
||||||
footer: UIs.height77,
|
|
||||||
buildDefaultDragHandles: false,
|
|
||||||
itemBuilder: (context, idx) {
|
|
||||||
final snippet = filtered.elementAt(idx);
|
|
||||||
return ReorderableDelayedDragStartListener(
|
|
||||||
key: ValueKey(idx),
|
|
||||||
index: idx,
|
|
||||||
child: _buildSnippetItem(snippet),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
}),
|
||||||
|
footer: UIs.height77,
|
||||||
|
buildDefaultDragHandles: false,
|
||||||
|
itemBuilder: (context, idx) {
|
||||||
|
final snippet = filtered.elementAt(idx);
|
||||||
|
return ReorderableDelayedDragStartListener(
|
||||||
|
key: ValueKey(idx),
|
||||||
|
index: idx,
|
||||||
|
child: _buildSnippetItem(snippet),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ class SSHPageState extends State<SSHPage>
|
|||||||
.where((element) => element.tags?.contains(e) ?? false)
|
.where((element) => element.tags?.contains(e) ?? false)
|
||||||
.toList();
|
.toList();
|
||||||
},
|
},
|
||||||
name: (e) => e.name,
|
display: (e) => e.name,
|
||||||
);
|
);
|
||||||
if (snippets == null || snippets.isEmpty) return;
|
if (snippets == null || snippets.isEmpty) return;
|
||||||
|
|
||||||
|
|||||||
@@ -287,8 +287,9 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
|
|||||||
title: libL10n.select,
|
title: libL10n.select,
|
||||||
items: ServerProvider.serverOrder.value
|
items: ServerProvider.serverOrder.value
|
||||||
.map((e) => ServerProvider.pick(id: e)?.value.spi)
|
.map((e) => ServerProvider.pick(id: e)?.value.spi)
|
||||||
|
.whereType<Spi>()
|
||||||
.toList(),
|
.toList(),
|
||||||
name: (e) => e.name,
|
display: (e) => e.name,
|
||||||
);
|
);
|
||||||
if (spi == null) return;
|
if (spi == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ void _onTapMoreBtns(
|
|||||||
.where((element) => element.tags?.contains(e) ?? false)
|
.where((element) => element.tags?.contains(e) ?? false)
|
||||||
.toList();
|
.toList();
|
||||||
},
|
},
|
||||||
name: (e) => e.name,
|
display: (e) => e.name,
|
||||||
);
|
);
|
||||||
if (snippets == null || snippets.isEmpty) return;
|
if (snippets == null || snippets.isEmpty) return;
|
||||||
final snippet = snippets.firstOrNull;
|
final snippet = snippets.firstOrNull;
|
||||||
|
|||||||
70
pubspec.lock
70
pubspec.lock
@@ -151,7 +151,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
choice:
|
choice:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: choice
|
name: choice
|
||||||
sha256: "52d07065e8056beba5b26cff7786134cbfa24927b1f5bf60a05d50058597b2d9"
|
sha256: "52d07065e8056beba5b26cff7786134cbfa24927b1f5bf60a05d50058597b2d9"
|
||||||
@@ -389,11 +389,9 @@ packages:
|
|||||||
fl_lib:
|
fl_lib:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "../fl_lib"
|
||||||
ref: "v1.0.134"
|
relative: true
|
||||||
resolved-ref: "24b9778e8fb482ee233b70bcc4a38587aa7f76b1"
|
source: path
|
||||||
url: "https://github.com/lppcg/fl_lib"
|
|
||||||
source: git
|
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
@@ -927,54 +925,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "2.3.0"
|
||||||
permission_handler:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler
|
|
||||||
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "11.3.1"
|
|
||||||
permission_handler_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_android
|
|
||||||
sha256: eaf2a1ec4472775451e88ca6a7b86559ef2f1d1ed903942ed135e38ea0097dca
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "12.0.8"
|
|
||||||
permission_handler_apple:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_apple
|
|
||||||
sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "9.4.5"
|
|
||||||
permission_handler_html:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_html
|
|
||||||
sha256: "6cac773d389e045a8d4f85418d07ad58ef9e42a56e063629ce14c4c26344de24"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.2"
|
|
||||||
permission_handler_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_platform_interface
|
|
||||||
sha256: fe0ffe274d665be8e34f9c59705441a7d248edebbe5d9e3ec2665f88b79358ea
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.2.2"
|
|
||||||
permission_handler_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: permission_handler_windows
|
|
||||||
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.1"
|
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1184,14 +1134,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
shortid:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: shortid
|
|
||||||
sha256: d0b40e3dbb50497dad107e19c54ca7de0d1a274eb9b4404991e443dadb9ebedb
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.2"
|
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -1547,10 +1489,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: window_manager
|
name: window_manager
|
||||||
sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf"
|
sha256: e052224c7d8f0d1d0b2e03b7b1047bb08ea800d919a79453518311839881fa5f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.9"
|
version: "0.4.0"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ dependencies:
|
|||||||
wake_on_lan: ^4.1.1+3
|
wake_on_lan: ^4.1.1+3
|
||||||
extended_image: ^8.2.1
|
extended_image: ^8.2.1
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
|
choice: ^2.3.2
|
||||||
dartssh2:
|
dartssh2:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lollipopkit/dartssh2
|
url: https://github.com/lollipopkit/dartssh2
|
||||||
@@ -59,7 +60,7 @@ dependencies:
|
|||||||
fl_lib:
|
fl_lib:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lppcg/fl_lib
|
url: https://github.com/lppcg/fl_lib
|
||||||
ref: v1.0.134
|
ref: v1.0.140
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
# dartssh2:
|
# dartssh2:
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||||
#include <local_auth_windows/local_auth_plugin.h>
|
#include <local_auth_windows/local_auth_plugin.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
|
||||||
#include <screen_retriever/screen_retriever_plugin.h>
|
#include <screen_retriever/screen_retriever_plugin.h>
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
@@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||||
LocalAuthPluginRegisterWithRegistrar(
|
LocalAuthPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
|
||||||
ScreenRetrieverPluginRegisterWithRegistrar(
|
ScreenRetrieverPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
|
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
|
||||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_color
|
dynamic_color
|
||||||
local_auth_windows
|
local_auth_windows
|
||||||
permission_handler_windows
|
|
||||||
screen_retriever
|
screen_retriever
|
||||||
share_plus
|
share_plus
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
|
|||||||
Reference in New Issue
Block a user