update
This commit is contained in:
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 |
Binary file not shown.
|
Before Width: | Height: | Size: 284 KiB |
BIN
assets/login_background.webp
Normal file
BIN
assets/login_background.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 961 KiB |
BIN
assets/register_background.webp
Normal file
BIN
assets/register_background.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 354 KiB |
|
|
@ -79,6 +79,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
body: PageBackgroundWidget(
|
body: PageBackgroundWidget(
|
||||||
|
page: 'login',
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
|
|
||||||
|
|
@ -61,59 +61,60 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: PageBackgroundWidget(
|
body: PageBackgroundWidget(
|
||||||
|
page: 'register',
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Gap(96),
|
const Gap(96),
|
||||||
const TitleWidget(firstTextSize: 20, secondTextSize: 32),
|
const TitleWidget(firstTextSize: 20, secondTextSize: 32),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
const TextWidget(text: 'Register'),
|
const TextWidget(text: 'Register'),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 32, right: 32),
|
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color.fromRGBO(57, 38, 62, 0.6),
|
color: const Color.fromRGBO(57, 38, 62, 0.6),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
offset: Offset(0, 2),
|
offset: Offset(0, 2),
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
child: Form(
|
child: Form(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
InputWidget(label: 'Email', controller: _emailController),
|
InputWidget(label: 'Email', controller: _emailController),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
InputWidget(
|
InputWidget(
|
||||||
label: 'Password',
|
label: 'Password',
|
||||||
controller: _passwordController,
|
controller: _passwordController,
|
||||||
password: true,
|
password: true,
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
InputWidget(
|
InputWidget(
|
||||||
label: 'Confirm Password',
|
label: 'Confirm Password',
|
||||||
controller: _confirmPasswordController,
|
controller: _confirmPasswordController,
|
||||||
password: true,
|
password: true,
|
||||||
),
|
),
|
||||||
const Gap(40),
|
const Gap(40),
|
||||||
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
||||||
if (_isLoading)
|
if (_isLoading)
|
||||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||||
else
|
else
|
||||||
ButtonWidget(text: 'Create Account', onPressed: _signUp)
|
ButtonWidget(text: 'Create Account', onPressed: _signUp)
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
)),
|
||||||
),
|
|
||||||
)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,37 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PageBackgroundWidget extends StatelessWidget {
|
class PageBackgroundWidget extends StatelessWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
final String? page;
|
||||||
|
|
||||||
const PageBackgroundWidget({super.key, required this.child});
|
const PageBackgroundWidget({super.key, required this.child, this.page});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
// physics: NeverScrollableScrollPhysics(),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: MediaQuery.of(context).size.height + 200,
|
height: MediaQuery.of(context).size.height + 200,
|
||||||
decoration: const BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(image: AssetImage('assets/background2.webp'), fit: BoxFit.fitWidth, opacity: 0.2),
|
image: DecorationImage(
|
||||||
gradient: RadialGradient(
|
// 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,
|
tileMode: TileMode.clamp,
|
||||||
colors: [
|
colors: [
|
||||||
// Color.fromRGBO(132, 84, 125, 1),
|
|
||||||
// Color.fromRGBO(96, 48, 90, 1),
|
|
||||||
Color.fromRGBO(45, 15, 43, 1),
|
Color.fromRGBO(45, 15, 43, 1),
|
||||||
Color.fromRGBO(77, 29, 73, 1),
|
Color.fromRGBO(77, 29, 73, 1),
|
||||||
// Color.fromRGBO(241, 220, 223, 1),
|
|
||||||
],
|
],
|
||||||
// begin: Alignment.topCenter,
|
|
||||||
// end: Alignment.bottomCenter,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,5 @@ 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
|
- assets/login_background.webp
|
||||||
|
- assets/register_background.webp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue