update
This commit is contained in:
parent
b2aeb642cc
commit
b6b7ab6e84
8 changed files with 155 additions and 61 deletions
66
lib/pages/main_page.dart
Normal file
66
lib/pages/main_page.dart
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
||||
import 'package:pharmacy_mobile/widgets/menu_widget.dart';
|
||||
|
||||
class MainPage extends StatelessWidget {
|
||||
const MainPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final authService = AuthService();
|
||||
|
||||
void signOut() async {
|
||||
await authService.signOut();
|
||||
context.push('/');
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: const BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(34, 51, 69, 1),
|
||||
Color.fromRGBO(22, 32, 44, 1),
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const Gap(120),
|
||||
Text('Ofelia Franco-Alcala',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16))),
|
||||
Text('Pharmacy',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32))),
|
||||
const Gap(32),
|
||||
Text('Menu',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32))),
|
||||
const Gap(16),
|
||||
MenuWidget(
|
||||
icon: FontAwesomeIcons.squarePlus,
|
||||
text: 'Add Medicine',
|
||||
),
|
||||
const Gap(16),
|
||||
MenuWidget(
|
||||
icon: FontAwesomeIcons.squarePlus,
|
||||
text: 'Add Medicine',
|
||||
),
|
||||
TextButton(onPressed: () => {signOut()}, child: const Text('Logout'))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue