mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: home top bar
This commit is contained in:
@@ -21,21 +21,19 @@ final class _TopBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
Center(
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(13),
|
||||
onTap: () => DebugPage.route.go(
|
||||
context,
|
||||
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 7),
|
||||
onTap: () {
|
||||
SettingsPage.route.go(context);
|
||||
},
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 7, vertical: 3),
|
||||
child: Row(
|
||||
children: [
|
||||
Btn.icon(
|
||||
icon: const Icon(Icons.settings),
|
||||
onTap: () {
|
||||
SettingsPage.route.go(context);
|
||||
},
|
||||
Text(
|
||||
BuildData.name,
|
||||
style: TextStyle(fontSize: 19),
|
||||
),
|
||||
const Icon(
|
||||
SizedBox(width: 3),
|
||||
Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
color: Colors.grey,
|
||||
size: 17,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'dart:io';
|
||||
import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_highlight/theme_map.dart';
|
||||
import 'package:server_box/data/store/setting.dart';
|
||||
|
||||
import 'package:server_box/generated/l10n/l10n.dart';
|
||||
import 'package:icons_plus/icons_plus.dart';
|
||||
@@ -81,30 +82,38 @@ class _SettingsPageState extends State<SettingsPage>
|
||||
.map((e) => Tab(text: e.i18n))
|
||||
.toList(growable: false),
|
||||
),
|
||||
actions: [
|
||||
Btn.icon(
|
||||
icon: const Icon(Icons.developer_board),
|
||||
onTap: () => DebugPage.route.go(
|
||||
context,
|
||||
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
|
||||
),
|
||||
),
|
||||
Btn.icon(
|
||||
icon: const Icon(Icons.delete),
|
||||
onTap: () => context.showRoundDialog(
|
||||
title: libL10n.attention,
|
||||
child: SimpleMarkdown(
|
||||
data: libL10n.askContinue(
|
||||
'${libL10n.delete} **${libL10n.all}** ${libL10n.setting}',
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
CountDownBtn(
|
||||
onTap: () {
|
||||
context.pop();
|
||||
final keys = SettingStore.instance.box.keys;
|
||||
SettingStore.instance.box.deleteAll(keys);
|
||||
context.showSnackBar(libL10n.success);
|
||||
},
|
||||
afterColor: Colors.red,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// actions: [
|
||||
// IconButton(
|
||||
// icon: const Icon(Icons.delete),
|
||||
// onPressed: () => context.showRoundDialog(
|
||||
// title: libL10n.attention,
|
||||
// child: SimpleMarkdown(
|
||||
// data: libL10n.askContinue(
|
||||
// '${libL10n.delete} **${libL10n.all}** ${libL10n.setting}',
|
||||
// ),
|
||||
// ),
|
||||
// actions: [
|
||||
// CountDownBtn(
|
||||
// onTap: () {
|
||||
// context.pop();
|
||||
// _setting.box.deleteAll(_setting.box.keys);
|
||||
// context.showSnackBar(libL10n.success);
|
||||
// },
|
||||
// afterColor: Colors.red,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
body: TabBarView(controller: _tabCtrl, children: SettingsTabs.pages),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -478,8 +478,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "v1.0.219"
|
||||
resolved-ref: "1b52e9179ded8e0e90d9419a4e6d47c0ef4d1dd0"
|
||||
ref: "v1.0.221"
|
||||
resolved-ref: a0dc0032eaafb596a7886fca1237f404b2c1b1a8
|
||||
url: "https://github.com/lppcg/fl_lib"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
|
||||
@@ -60,7 +60,7 @@ dependencies:
|
||||
fl_lib:
|
||||
git:
|
||||
url: https://github.com/lppcg/fl_lib
|
||||
ref: v1.0.219
|
||||
ref: v1.0.221
|
||||
|
||||
dependency_overrides:
|
||||
# dartssh2:
|
||||
|
||||
Reference in New Issue
Block a user