mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt. & fix
- fix: pve text color - opt.: rm ssh tab appbar - opt.: ssh tab only display fab on `Add` page
This commit is contained in:
@@ -111,7 +111,8 @@ class _HomePageState extends State<HomePage>
|
||||
|
||||
return Scaffold(
|
||||
drawer: _buildDrawer(),
|
||||
appBar: CustomAppBar(
|
||||
appBar: _AppBar(
|
||||
selectIndex: _selectIndex,
|
||||
centerTitle: false,
|
||||
title: const Text(BuildData.name),
|
||||
actions: <Widget>[
|
||||
@@ -357,3 +358,27 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class _AppBar extends CustomAppBar {
|
||||
final ValueNotifier<int> selectIndex;
|
||||
|
||||
const _AppBar({
|
||||
required this.selectIndex,
|
||||
super.title,
|
||||
super.actions,
|
||||
super.centerTitle,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ValueListenableBuilder(
|
||||
valueListenable: selectIndex,
|
||||
builder: (_, idx, __) {
|
||||
if (idx == AppTab.ssh.index) {
|
||||
return SizedBox(height: CustomAppBar.barHeight);
|
||||
}
|
||||
return super.build(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user