This commit is contained in:
Patrick Alvin Alcala 2025-02-05 11:57:06 +08:00
parent 2c63edd554
commit 5b6134a5c3
9 changed files with 72 additions and 62 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

View file

@ -79,6 +79,7 @@ class _LoginPageState extends State<LoginPage> {
return Scaffold(
resizeToAvoidBottomInset: false,
body: PageBackgroundWidget(
page: 'login',
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,

View file

@ -61,6 +61,7 @@ class _RegisterPageState extends State<RegisterPage> {
Widget build(BuildContext context) {
return Scaffold(
body: PageBackgroundWidget(
page: 'register',
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,

View file

@ -2,30 +2,37 @@ import 'package:flutter/material.dart';
class PageBackgroundWidget extends StatelessWidget {
final Widget child;
final String? page;
const PageBackgroundWidget({super.key, required this.child});
const PageBackgroundWidget({super.key, required this.child, this.page});
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
scrollDirection: Axis.vertical,
// physics: NeverScrollableScrollPhysics(),
child: Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height + 200,
decoration: const BoxDecoration(
image: DecorationImage(image: AssetImage('assets/background2.webp'), fit: BoxFit.fitWidth, opacity: 0.2),
gradient: RadialGradient(
decoration: BoxDecoration(
image: DecorationImage(
// Image.asset('assets/ph_logo2.webp',
// width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
image: AssetImage(page == 'login'
? 'assets/login_background.webp'
: page == 'register'
? 'assets/register_background.webp'
: 'assets/background.webp'),
// image: Image.asset('assets/login_background.webp', width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
fit: BoxFit.fitWidth,
alignment: Alignment.topCenter,
opacity: 0.2,
),
gradient: const 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(

View file

@ -34,4 +34,5 @@ flutter:
- assets/ph_logo.webp
- assets/ph_logo2.webp
- assets/background.webp
- assets/background2.webp
- assets/login_background.webp
- assets/register_background.webp