feat:增加回到顶部功能

This commit is contained in:
2025-07-24 16:50:50 +08:00
parent 7da3ec9507
commit 502bb9df52
9 changed files with 254 additions and 62 deletions

View File

@@ -93,7 +93,7 @@ class SettingsDrawer extends StatelessWidget {
}
}
List<StatelessWidget> homeActions() {
List<StatelessWidget> homeActions(BuildContext context) {
return [
IconButton(
icon: Icon(Icons.search, color: Colors.white),
@@ -101,15 +101,21 @@ List<StatelessWidget> homeActions() {
// 搜索功能
},
),
Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.settings, color: Colors.white),
onPressed: () {
Scaffold.of(context).openEndDrawer();
},
);
IconButton(
icon: Icon(Icons.add, color: Colors.white),
onPressed: () {
Navigator.pushNamed(context, '/recordForm');
},
),
// Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.settings, color: Colors.white),
// onPressed: () {
// Scaffold.of(context).openEndDrawer();
// },
// );
// },
// ),
];
}