diff --git a/lib/pages/dashboard_page.dart b/lib/pages/dashboard_page.dart index 2f0515a..e450783 100644 --- a/lib/pages/dashboard_page.dart +++ b/lib/pages/dashboard_page.dart @@ -26,6 +26,12 @@ class _DashboardPageState extends State { Widget build(BuildContext context) { checklistProvider = Provider.of(context, listen: true); return Scaffold( + appBar: AppBar(actions: [ + IconButton( + onPressed: () => DbHelper.logout(), + icon: const Icon(Icons.logout), + ) + ]), body: FutureBuilder( future: checklistFuture, builder: _futureBuilder, diff --git a/lib/services/dbhelper.dart b/lib/services/dbhelper.dart index a166603..e71df8d 100644 --- a/lib/services/dbhelper.dart +++ b/lib/services/dbhelper.dart @@ -23,6 +23,10 @@ class DbHelper { ); } + static Future logout() async { + await _client.auth.signOut(); + } + static Future> get fetchChecklist async { //TODO replace example data await Future.delayed(const Duration(seconds: 2));