59 lines
1.9 KiB
Dart
59 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/menu_widget2.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:go_router/go_router.dart';
|
|
|
|
class CustomerMainPage extends StatefulWidget {
|
|
// final NotchBottomBarController? controller;
|
|
const CustomerMainPage({super.key});
|
|
|
|
@override
|
|
State<CustomerMainPage> createState() => _CustomerMainPageState();
|
|
}
|
|
|
|
class _CustomerMainPageState extends State<CustomerMainPage> {
|
|
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) {
|
|
return Scaffold(
|
|
body: PageBackgroundWidget(
|
|
child: Column(
|
|
children: [
|
|
Column(
|
|
children: [
|
|
const Gap(96),
|
|
const TitleWidget(
|
|
firstTextSize: 14,
|
|
secondTextSize: 24,
|
|
logoSize: 90,
|
|
),
|
|
const Gap(32),
|
|
const TextWidget(text: 'Menu'),
|
|
const Gap(16),
|
|
MenuWidget2(
|
|
// icon: FontAwesomeIcons.diagramNext,
|
|
text: 'Diagnose by ',
|
|
description: 'aaa',
|
|
onPressed: () => {context.push('/deletestock')},
|
|
color: 'green',
|
|
),
|
|
const Gap(32),
|
|
ButtonWidget(text: 'Log Out', onPressed: signOut)
|
|
],
|
|
)
|
|
],
|
|
)));
|
|
}
|
|
}
|