60 lines
2 KiB
Dart
60 lines
2 KiB
Dart
import 'dart:developer';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
// import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/slogan_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
|
|
|
class IndexPage extends StatelessWidget {
|
|
const IndexPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
void gotoLogin() {
|
|
log(MediaQuery.of(context).size.height.toString());
|
|
context.push('/login');
|
|
}
|
|
|
|
void gotoRegister() {
|
|
context.push('/register');
|
|
}
|
|
|
|
return Scaffold(
|
|
resizeToAvoidBottomInset: false,
|
|
body: PageBackgroundWidget(
|
|
child: Column(
|
|
children: [
|
|
const Gap(88),
|
|
const TitleWidget(firstTextSize: 32, secondTextSize: 40),
|
|
const Gap(32),
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
|
|
child: Image.asset('assets/ph_logo2.webp',
|
|
width: 200, cacheWidth: (200 * MediaQuery.of(context).devicePixelRatio).round()),
|
|
),
|
|
const Gap(64),
|
|
ButtonWidget(text: 'Login', onPressed: gotoLogin),
|
|
const Gap(8),
|
|
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
|
const Gap(32),
|
|
const SloganWidget(),
|
|
const Gap(32),
|
|
const MaxGap(500),
|
|
const TextWidget(
|
|
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
|
|
size: 10,
|
|
bold: true,
|
|
footer: true,
|
|
),
|
|
const TextWidget(text: 'Developed By: Pat Alcala', size: 8, opacity: 0.8, footer: true),
|
|
const Gap(16),
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|