mirror of
https://github.com/go-vikunja/app
synced 2024-06-03 19:19:46 +00:00
changed how appbars are handled so namespaces can have their names as the appbar title
This commit is contained in:
parent
69a8608390
commit
b917b27a83
|
@ -68,9 +68,6 @@ class HomePageState extends State<HomePage> {
|
|||
});
|
||||
},
|
||||
),
|
||||
appBar: AppBar(
|
||||
title: new Text("Vikunja"),
|
||||
),
|
||||
body: drawerItem,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -129,7 +129,12 @@ class LandingPageState extends State<LandingPage>
|
|||
_addItemDialog(context);
|
||||
},
|
||||
child: const Icon(Icons.add),
|
||||
)));
|
||||
)),
|
||||
appBar: AppBar(
|
||||
title: Text("Vikunja"),
|
||||
),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
_addItemDialog(BuildContext context) {
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -58,6 +58,8 @@ class SettingsPageState extends State<SettingsPage> {
|
|||
|
||||
if (!initialized) init();
|
||||
return new Scaffold(
|
||||
appBar: AppBar(title: Text("Settings"),),
|
||||
|
||||
body: Column(
|
||||
children: [
|
||||
UserAccountsDrawerHeader(
|
||||
|
|
Loading…
Reference in New Issue
Block a user