WIP: File Browsing with Backbutton

This commit is contained in:
2023-03-22 23:44:26 +01:00
parent 3e7dd1b0c7
commit d7a2de4a92
4 changed files with 65 additions and 67 deletions

View File

@ -22,25 +22,6 @@ class App extends StatefulWidget {
class _AppState extends State<App> {
int currentPage = 0;
late AppBar _appBar;
void setAppBar(BuildContext context, AppBar? appBar) {
setState(() {
_appBar = appBar ?? AppBar(
title: const Text("Marianum Fulda"),
actions: <Widget>[
IconButton(
padding: const EdgeInsets.only(right: 15),
icon: const Icon(Icons.settings),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => const Settings()));
},
)
],
);
});
setState(() {});
}
@override
void initState() {
@ -55,8 +36,6 @@ class _AppState extends State<App> {
Provider.of<ChatListProps>(context, listen: false).run();
});
setAppBar(context, null);
super.initState();
}
@ -75,7 +54,7 @@ class _AppState extends State<App> {
screens: [
const Timetable(),
const ChatList(),
Files(setAppBar),
Files(const []),
const Overhang(),
],
items: [