added title and future bugfix
This commit is contained in:
@@ -26,12 +26,15 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
checklistProvider = Provider.of<ChecklistProvider>(context, listen: true);
|
checklistProvider = Provider.of<ChecklistProvider>(context, listen: true);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(actions: [
|
appBar: AppBar(
|
||||||
|
title: const Text('Brießenchecker9000'),
|
||||||
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => DbHelper.logout(),
|
onPressed: () => DbHelper.logout(),
|
||||||
icon: const Icon(Icons.logout),
|
icon: const Icon(Icons.logout),
|
||||||
)
|
)
|
||||||
]),
|
],
|
||||||
|
),
|
||||||
body: FutureBuilder(
|
body: FutureBuilder(
|
||||||
future: checklistFuture,
|
future: checklistFuture,
|
||||||
builder: _futureBuilder,
|
builder: _futureBuilder,
|
||||||
@@ -70,8 +73,8 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
void _onAddTapped() {
|
void _onAddTapped() {
|
||||||
DbHelper.addOrUpdateChecklist(null).then((id) {
|
DbHelper.addOrUpdateChecklist(null).then((id) {
|
||||||
checklistProvider.updateSelectedChecklist(id, silent: true);
|
checklistProvider.updateSelectedChecklist(id, silent: true);
|
||||||
});
|
}).whenComplete(
|
||||||
Navigator.of(context).pushNamed(DetailChecklistPage.routeName);
|
() => Navigator.of(context).pushNamed(DetailChecklistPage.routeName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onListEntryTapped(Checklist cl) {
|
void _onListEntryTapped(Checklist cl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user