update
This commit is contained in:
parent
2d3f5bd96e
commit
f4119130a6
17 changed files with 232 additions and 138 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:glossy/glossy.dart';
|
||||
import 'package:internet_connection_checker/internet_connection_checker.dart';
|
||||
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
||||
import 'package:pharmacy_mobile/widgets/buttonwithprogress_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/glossy_container_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
||||
|
|
@ -24,7 +26,8 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
final _confirmPasswordController = TextEditingController();
|
||||
final FocusNode _focusNode = FocusNode();
|
||||
|
||||
bool _isLoading = false;
|
||||
late bool _isLoading = false;
|
||||
late double containerHeight = 0.44;
|
||||
|
||||
Future<void> _signUp() async {
|
||||
final email = _emailController.text;
|
||||
|
|
@ -57,7 +60,10 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
return;
|
||||
}
|
||||
|
||||
setState(() => _isLoading = true);
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
containerHeight = 0.456;
|
||||
});
|
||||
|
||||
try {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
|
|
@ -82,7 +88,10 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
showNotification(context, 'Error: $e', false);
|
||||
}
|
||||
} finally {
|
||||
setState(() => _isLoading = false);
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
containerHeight = 0.44;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -119,19 +128,8 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
const Gap(16),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||
child: Container(
|
||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color.fromRGBO(57, 38, 62, 0.6),
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||
spreadRadius: 0,
|
||||
blurRadius: 4,
|
||||
offset: Offset(0, 2),
|
||||
)
|
||||
]),
|
||||
child: GlossyContainerWidget(
|
||||
height: containerHeight,
|
||||
child: Form(
|
||||
child: Column(
|
||||
children: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue