WIP: File Browsing with Backbutton
This commit is contained in:
23
lib/app.dart
23
lib/app.dart
@ -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: [
|
||||
|
Reference in New Issue
Block a user