update
This commit is contained in:
parent
c41c19b469
commit
6e4b2249b0
17 changed files with 276 additions and 187 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||
import 'package:animated_notch_bottom_bar/animated_notch_bottom_bar/animated_notch_bottom_bar.dart';
|
||||
|
|
@ -11,6 +15,13 @@ class CustomerProfilePage extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final authService = AuthService();
|
||||
|
||||
void signOut() async {
|
||||
// ignore: use_build_context_synchronously
|
||||
await authService.signOut().then((_) => {context.go('/'), showNotification(context, 'Logged Out', true)});
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
body: PageBackgroundWidget(
|
||||
child: Column(
|
||||
|
|
@ -26,6 +37,8 @@ class CustomerProfilePage extends StatelessWidget {
|
|||
const Gap(32),
|
||||
const TextWidget(text: 'My Profile'),
|
||||
const Gap(16),
|
||||
const Gap(32),
|
||||
ButtonWidget(text: 'Log Out', onPressed: signOut)
|
||||
],
|
||||
)
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue