update
This commit is contained in:
parent
7b89a8a471
commit
e6aebd9a64
5 changed files with 35 additions and 26 deletions
BIN
assets/background2.webp
Normal file
BIN
assets/background2.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 284 KiB |
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
// import 'package:google_fonts/google_fonts.dart';
|
||||
|
|
@ -14,6 +16,7 @@ class IndexPage extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
void gotoLogin() {
|
||||
log(MediaQuery.of(context).size.height.toString());
|
||||
context.push('/login');
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +29,7 @@ class IndexPage extends StatelessWidget {
|
|||
body: PageBackgroundWidget(
|
||||
child: Column(
|
||||
children: [
|
||||
const Gap(104),
|
||||
const Gap(88),
|
||||
const TitleWidget(firstTextSize: 32, secondTextSize: 40),
|
||||
const Gap(32),
|
||||
Padding(
|
||||
|
|
@ -40,6 +43,7 @@ class IndexPage extends StatelessWidget {
|
|||
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',
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@ class PageBackgroundWidget extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(image: AssetImage('assets/background.webp'), fit: BoxFit.cover, opacity: 0.1),
|
||||
image: DecorationImage(image: AssetImage('assets/background2.webp'), fit: BoxFit.fitWidth, opacity: 0.2),
|
||||
gradient: RadialGradient(
|
||||
tileMode: TileMode.clamp,
|
||||
colors: [
|
||||
|
|
@ -27,6 +30,7 @@ class PageBackgroundWidget extends StatelessWidget {
|
|||
),
|
||||
child: Center(
|
||||
child: child,
|
||||
));
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@ class SloganWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildSloganItem("Easy to Use"),
|
||||
_buildSloganItem("Easy to Use", 48),
|
||||
const Gap(8),
|
||||
_buildSloganItem("Access to Medicine"),
|
||||
_buildSloganItem("Access to Medicine", 88),
|
||||
const Gap(8),
|
||||
_buildSloganItem("Home Delivery"),
|
||||
_buildSloganItem("Instant Home Delivery", 128),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSloganItem(String text) {
|
||||
Widget _buildSloganItem(String text, double gap) {
|
||||
return Row(
|
||||
children: [
|
||||
const Gap(48),
|
||||
Gap(gap),
|
||||
FaIcon(
|
||||
size: 24,
|
||||
FontAwesomeIcons.circleCheck,
|
||||
|
|
|
|||
|
|
@ -34,3 +34,4 @@ flutter:
|
|||
- assets/ph_logo.webp
|
||||
- assets/ph_logo2.webp
|
||||
- assets/background.webp
|
||||
- assets/background2.webp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue