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:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
// import 'package:google_fonts/google_fonts.dart';
|
// import 'package:google_fonts/google_fonts.dart';
|
||||||
|
|
@ -14,6 +16,7 @@ class IndexPage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
void gotoLogin() {
|
void gotoLogin() {
|
||||||
|
log(MediaQuery.of(context).size.height.toString());
|
||||||
context.push('/login');
|
context.push('/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,7 +29,7 @@ class IndexPage extends StatelessWidget {
|
||||||
body: PageBackgroundWidget(
|
body: PageBackgroundWidget(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Gap(104),
|
const Gap(88),
|
||||||
const TitleWidget(firstTextSize: 32, secondTextSize: 40),
|
const TitleWidget(firstTextSize: 32, secondTextSize: 40),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
Padding(
|
Padding(
|
||||||
|
|
@ -40,6 +43,7 @@ class IndexPage extends StatelessWidget {
|
||||||
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
const SloganWidget(),
|
const SloganWidget(),
|
||||||
|
const Gap(32),
|
||||||
const MaxGap(500),
|
const MaxGap(500),
|
||||||
const TextWidget(
|
const TextWidget(
|
||||||
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
|
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
|
||||||
|
|
|
||||||
|
|
@ -7,26 +7,30 @@ class PageBackgroundWidget extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return SingleChildScrollView(
|
||||||
alignment: Alignment.center,
|
scrollDirection: Axis.vertical,
|
||||||
height: MediaQuery.of(context).size.height,
|
// physics: NeverScrollableScrollPhysics(),
|
||||||
decoration: const BoxDecoration(
|
child: Container(
|
||||||
image: DecorationImage(image: AssetImage('assets/background.webp'), fit: BoxFit.cover, opacity: 0.1),
|
alignment: Alignment.center,
|
||||||
gradient: RadialGradient(
|
height: MediaQuery.of(context).size.height,
|
||||||
tileMode: TileMode.clamp,
|
decoration: const BoxDecoration(
|
||||||
colors: [
|
image: DecorationImage(image: AssetImage('assets/background2.webp'), fit: BoxFit.fitWidth, opacity: 0.2),
|
||||||
// Color.fromRGBO(132, 84, 125, 1),
|
gradient: RadialGradient(
|
||||||
// Color.fromRGBO(96, 48, 90, 1),
|
tileMode: TileMode.clamp,
|
||||||
Color.fromRGBO(45, 15, 43, 1),
|
colors: [
|
||||||
Color.fromRGBO(77, 29, 73, 1),
|
// Color.fromRGBO(132, 84, 125, 1),
|
||||||
// Color.fromRGBO(241, 220, 223, 1),
|
// Color.fromRGBO(96, 48, 90, 1),
|
||||||
],
|
Color.fromRGBO(45, 15, 43, 1),
|
||||||
// begin: Alignment.topCenter,
|
Color.fromRGBO(77, 29, 73, 1),
|
||||||
// end: Alignment.bottomCenter,
|
// Color.fromRGBO(241, 220, 223, 1),
|
||||||
|
],
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
child: Center(
|
||||||
child: Center(
|
child: child,
|
||||||
child: child,
|
)),
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,19 +10,19 @@ class SloganWidget extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
_buildSloganItem("Easy to Use"),
|
_buildSloganItem("Easy to Use", 48),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
_buildSloganItem("Access to Medicine"),
|
_buildSloganItem("Access to Medicine", 88),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
_buildSloganItem("Home Delivery"),
|
_buildSloganItem("Instant Home Delivery", 128),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildSloganItem(String text) {
|
Widget _buildSloganItem(String text, double gap) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
const Gap(48),
|
Gap(gap),
|
||||||
FaIcon(
|
FaIcon(
|
||||||
size: 24,
|
size: 24,
|
||||||
FontAwesomeIcons.circleCheck,
|
FontAwesomeIcons.circleCheck,
|
||||||
|
|
|
||||||
|
|
@ -34,3 +34,4 @@ flutter:
|
||||||
- assets/ph_logo.webp
|
- assets/ph_logo.webp
|
||||||
- assets/ph_logo2.webp
|
- assets/ph_logo2.webp
|
||||||
- assets/background.webp
|
- assets/background.webp
|
||||||
|
- assets/background2.webp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue