Skip to content

Commit

Permalink
fix: fix drawer
Browse files Browse the repository at this point in the history
Signed-off-by: Mumulhl <[email protected]>
  • Loading branch information
mumu-lhl committed Jan 6, 2025
1 parent fa1d2fa commit 35a55f5
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions lib/pages/main/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ class _HomeState extends State<Home> {

AppBar? buildAppBar(BuildContext context) {
if (!dictManager.isEmpty && _currentIndex == 0) {
return AppBar(
flexibleSpace: buildSearchBar(context),
leading: buildDrawerButton(context),
);
return AppBar(title: buildSearchBar(context));
}
return null;
}
Expand All @@ -75,8 +72,8 @@ class _HomeState extends State<Home> {
for (final group in dictManager.groups)
ListTile(
leading: group.id == dictManager.groupId
? const Icon(Icons.circle)
: const Icon(Icons.circle_outlined),
? const Icon(Icons.circle, size: 10)
: const Icon(Icons.circle_outlined, size: 10),
title: Text(group.name),
onTap: () async {
context.pop();
Expand All @@ -88,18 +85,6 @@ class _HomeState extends State<Home> {
);
}

IconButton? buildDrawerButton(BuildContext context) {
if (_currentIndex == 0) {
return IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
Scaffold.of(context).openDrawer();
},
);
}
return null;
}

IconButton? buildRemoveButton() {
if (searchWord == "") {
return null;
Expand Down

0 comments on commit 35a55f5

Please sign in to comment.