1
0
mirror of https://github.com/go-vikunja/app synced 2024-06-02 18:49:47 +00:00

changed how appbars are handled so namespaces can have their names as the appbar title

This commit is contained in:
Benimautner 2023-05-16 22:13:02 +02:00
parent 69a8608390
commit b917b27a83
5 changed files with 28 additions and 11 deletions

View File

@ -68,9 +68,6 @@ class HomePageState extends State<HomePage> {
});
},
),
appBar: AppBar(
title: new Text("Vikunja"),
),
body: drawerItem,
);
}

View File

@ -129,7 +129,12 @@ class LandingPageState extends State<LandingPage>
_addItemDialog(context);
},
child: const Icon(Icons.add),
)));
)),
appBar: AppBar(
title: Text("Vikunja"),
),
);
}
_addItemDialog(BuildContext context) {

View File

@ -90,6 +90,9 @@ class _NamespacePageState extends State<NamespacePage> {
break;
}
return new Scaffold(
appBar: AppBar(
title: Text(widget.namespace.title),
),
body: RefreshIndicator(onRefresh: () => _loadLists(), child: body),
floatingActionButton: Builder(
builder: (context) => FloatingActionButton(

View File

@ -52,10 +52,12 @@ class _NamespaceOverviewPageState extends State<NamespaceOverviewPage>
}
return this._loading
? Center(child: CircularProgressIndicator())
: Scaffold(
body: RefreshIndicator(
return Scaffold(
body:
this._loading
? Center(child: CircularProgressIndicator())
:
RefreshIndicator(
child: ListView(
padding: EdgeInsets.zero,
children: ListTile.divideTiles(
@ -66,7 +68,11 @@ class _NamespaceOverviewPageState extends State<NamespaceOverviewPage>
floatingActionButton: Builder(
builder: (context) => FloatingActionButton(
onPressed: () => _addNamespaceDialog(context),
child: const Icon(Icons.add))));
child: const Icon(Icons.add))),
appBar: AppBar(
title: Text("Namespaces"),
),
);
}
Future<void> _loadNamespaces() {
@ -79,8 +85,12 @@ class _NamespaceOverviewPageState extends State<NamespaceOverviewPage>
}
_onSelectItem(int index) {
setState(() => _selectedDrawerIndex = index);
Navigator.push(context,
MaterialPageRoute(
builder: (buildContext) => NamespacePage(
namespace: _namespaces[index],
),));
//setState(() => _selectedDrawerIndex = index);
}
_addNamespaceDialog(BuildContext context) {

View File

@ -58,6 +58,8 @@ class SettingsPageState extends State<SettingsPage> {
if (!initialized) init();
return new Scaffold(
appBar: AppBar(title: Text("Settings"),),
body: Column(
children: [
UserAccountsDrawerHeader(