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(
|
Center(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(13),
|
borderRadius: BorderRadius.circular(13),
|
||||||
onTap: () => DebugPage.route.go(
|
onTap: () {
|
||||||
context,
|
SettingsPage.route.go(context);
|
||||||
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
|
},
|
||||||
),
|
child: const Padding(
|
||||||
child: Padding(
|
padding: EdgeInsets.symmetric(horizontal: 7, vertical: 3),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 7),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Btn.icon(
|
Text(
|
||||||
icon: const Icon(Icons.settings),
|
BuildData.name,
|
||||||
onTap: () {
|
style: TextStyle(fontSize: 19),
|
||||||
SettingsPage.route.go(context);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
const Icon(
|
SizedBox(width: 3),
|
||||||
|
Icon(
|
||||||
Icons.keyboard_arrow_right,
|
Icons.keyboard_arrow_right,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
size: 17,
|
size: 17,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'dart:io';
|
|||||||
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:flutter_highlight/theme_map.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:server_box/generated/l10n/l10n.dart';
|
||||||
import 'package:icons_plus/icons_plus.dart';
|
import 'package:icons_plus/icons_plus.dart';
|
||||||
@@ -81,30 +82,38 @@ class _SettingsPageState extends State<SettingsPage>
|
|||||||
.map((e) => Tab(text: e.i18n))
|
.map((e) => Tab(text: e.i18n))
|
||||||
.toList(growable: false),
|
.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),
|
body: TabBarView(controller: _tabCtrl, children: SettingsTabs.pages),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,8 +478,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "v1.0.219"
|
ref: "v1.0.221"
|
||||||
resolved-ref: "1b52e9179ded8e0e90d9419a4e6d47c0ef4d1dd0"
|
resolved-ref: a0dc0032eaafb596a7886fca1237f404b2c1b1a8
|
||||||
url: "https://github.com/lppcg/fl_lib"
|
url: "https://github.com/lppcg/fl_lib"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
|||||||
@@ -60,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.219
|
ref: v1.0.221
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
# dartssh2:
|
# dartssh2:
|
||||||
|
|||||||
Reference in New Issue
Block a user