diff --git a/assets/background2.webp b/assets/background2.webp new file mode 100644 index 0000000..55c482f Binary files /dev/null and b/assets/background2.webp differ diff --git a/lib/pages/index_page.dart b/lib/pages/index_page.dart index d5a087b..c1c9e32 100644 --- a/lib/pages/index_page.dart +++ b/lib/pages/index_page.dart @@ -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', diff --git a/lib/widgets/page_background_widget.dart b/lib/widgets/page_background_widget.dart index 5030e54..4c47b6e 100644 --- a/lib/widgets/page_background_widget.dart +++ b/lib/widgets/page_background_widget.dart @@ -7,26 +7,30 @@ class PageBackgroundWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return 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), - gradient: RadialGradient( - tileMode: TileMode.clamp, - colors: [ - // Color.fromRGBO(132, 84, 125, 1), - // Color.fromRGBO(96, 48, 90, 1), - Color.fromRGBO(45, 15, 43, 1), - Color.fromRGBO(77, 29, 73, 1), - // Color.fromRGBO(241, 220, 223, 1), - ], - // begin: Alignment.topCenter, - // end: Alignment.bottomCenter, + 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/background2.webp'), fit: BoxFit.fitWidth, opacity: 0.2), + gradient: RadialGradient( + tileMode: TileMode.clamp, + colors: [ + // Color.fromRGBO(132, 84, 125, 1), + // Color.fromRGBO(96, 48, 90, 1), + Color.fromRGBO(45, 15, 43, 1), + Color.fromRGBO(77, 29, 73, 1), + // Color.fromRGBO(241, 220, 223, 1), + ], + // begin: Alignment.topCenter, + // end: Alignment.bottomCenter, + ), ), - ), - child: Center( - child: child, - )); + child: Center( + child: child, + )), + ); } } diff --git a/lib/widgets/slogan_widget.dart b/lib/widgets/slogan_widget.dart index cd3db2f..6f2f2bb 100644 --- a/lib/widgets/slogan_widget.dart +++ b/lib/widgets/slogan_widget.dart @@ -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, diff --git a/pubspec.yaml b/pubspec.yaml index a723565..6e3cae3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,3 +34,4 @@ flutter: - assets/ph_logo.webp - assets/ph_logo2.webp - assets/background.webp + - assets/background2.webp