update
This commit is contained in:
parent
5f0d2e60d2
commit
8bbc29f521
6 changed files with 64 additions and 62 deletions
|
|
@ -5,25 +5,28 @@ import 'package:pharmacy_mobile/auth/auth_service.dart';
|
|||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/customer_pagebackground_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/customer_title_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';
|
||||
|
||||
class CustomerProfilePage extends StatelessWidget {
|
||||
final NotchBottomBarController? controller;
|
||||
const CustomerProfilePage({super.key, this.controller});
|
||||
class CustomerProfilePage extends StatefulWidget {
|
||||
// final NotchBottomBarController? controller;
|
||||
const CustomerProfilePage({super.key});
|
||||
|
||||
@override
|
||||
State<CustomerProfilePage> createState() => _CustomerProfilePageState();
|
||||
}
|
||||
|
||||
class _CustomerProfilePageState extends State<CustomerProfilePage> {
|
||||
final authService = AuthService();
|
||||
|
||||
void _signOut() async {
|
||||
// ignore: use_build_context_synchronously
|
||||
await authService.signOut().then((_) => {context.go('/'), showNotification(context, 'Logged Out', true)});
|
||||
}
|
||||
|
||||
@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: CustomerPagebackgroundWidget(
|
||||
child: Column(
|
||||
|
|
@ -36,7 +39,7 @@ class CustomerProfilePage extends StatelessWidget {
|
|||
const TextWidget(text: 'My Profile'),
|
||||
const Gap(16),
|
||||
const Gap(32),
|
||||
ButtonWidget(text: 'Log Out', onPressed: signOut)
|
||||
ButtonWidget(text: 'Log Out', onPressed: _signOut)
|
||||
],
|
||||
)
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue