|
|
@ -7,6 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_signin_button/button_list.dart';
|
|
|
|
import 'package:flutter_signin_button/button_list.dart';
|
|
|
|
import 'package:flutter_signin_button/button_view.dart';
|
|
|
|
import 'package:flutter_signin_button/button_view.dart';
|
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
|
|
|
|
import 'package:justmusic/exceptions/user_exception.dart';
|
|
|
|
import 'package:justmusic/values/constants.dart';
|
|
|
|
import 'package:justmusic/values/constants.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../components/login_button.dart';
|
|
|
|
import '../components/login_button.dart';
|
|
|
@ -46,6 +47,18 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signInWithGoogle() async {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
await MyApp.userViewModel.signInWithGoogle();
|
|
|
|
|
|
|
|
} on UserException catch (e) {
|
|
|
|
|
|
|
|
if (e.code == 'user-created') {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, '/explanation');
|
|
|
|
|
|
|
|
} else if (e.code == 'user-already-exist') {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, '/feed');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
@ -63,8 +76,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
padding: EdgeInsets.only(top: 100.h),
|
|
|
|
padding: EdgeInsets.only(top: 100.h),
|
|
|
|
child: AutoSizeText(
|
|
|
|
child: AutoSizeText(
|
|
|
|
"On a besoin de ça!",
|
|
|
|
"On a besoin de ça!",
|
|
|
|
style:
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.w600, fontSize: 30.w),
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
fontSize: 30.w),
|
|
|
|
maxLines: 1,
|
|
|
|
maxLines: 1,
|
|
|
|
maxFontSize: 50,
|
|
|
|
maxFontSize: 50,
|
|
|
|
overflow: TextOverflow.fade,
|
|
|
|
overflow: TextOverflow.fade,
|
|
|
@ -76,7 +91,8 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: defaultPadding),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
|
|
|
horizontal: defaultPadding),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 50.h),
|
|
|
|
padding: EdgeInsets.only(bottom: 50.h),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
@ -90,7 +106,9 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
child: AutoSizeText(
|
|
|
|
child: AutoSizeText(
|
|
|
|
"Promis c’est rapide.",
|
|
|
|
"Promis c’est rapide.",
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
color: Colors.white, fontWeight: FontWeight.w400, fontSize: 17.w),
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
|
|
|
fontSize: 17.w),
|
|
|
|
maxFontSize: 20,
|
|
|
|
maxFontSize: 20,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -100,7 +118,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
bottom: 16.h,
|
|
|
|
|
|
|
|
left: defaultPadding,
|
|
|
|
|
|
|
|
right: defaultPadding),
|
|
|
|
child: TextFormField(
|
|
|
|
child: TextFormField(
|
|
|
|
controller: _userPseudoTextField,
|
|
|
|
controller: _userPseudoTextField,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
@ -112,24 +133,37 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
style: GoogleFonts.plusJakartaSans(color: primaryColor, fontSize: 15),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: primaryColor, fontSize: 15),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1.sp, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1.sp,
|
|
|
|
prefix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
color: strokeTextField),
|
|
|
|
suffix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
borderRadius: const BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(10))),
|
|
|
|
|
|
|
|
prefix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
|
|
|
|
suffix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
fillColor: bgTextField,
|
|
|
|
fillColor: bgTextField,
|
|
|
|
filled: true,
|
|
|
|
filled: true,
|
|
|
|
focusColor: const Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
focusColor: const Color.fromRGBO(
|
|
|
|
|
|
|
|
255, 255, 255, 0.30),
|
|
|
|
enabledBorder: const OutlineInputBorder(
|
|
|
|
enabledBorder: const OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(10))),
|
|
|
|
hintText: 'Pseudo',
|
|
|
|
hintText: 'Pseudo',
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(color: strokeTextField)),
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: strokeTextField)),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
bottom: 16.h,
|
|
|
|
|
|
|
|
left: defaultPadding,
|
|
|
|
|
|
|
|
right: defaultPadding),
|
|
|
|
child: TextFormField(
|
|
|
|
child: TextFormField(
|
|
|
|
controller: _userMailTextField,
|
|
|
|
controller: _userMailTextField,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
@ -141,24 +175,36 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
style: GoogleFonts.plusJakartaSans(color: primaryColor),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: primaryColor),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
prefix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
suffix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
Radius.circular(10))),
|
|
|
|
|
|
|
|
prefix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
|
|
|
|
suffix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
fillColor: bgTextField,
|
|
|
|
fillColor: bgTextField,
|
|
|
|
filled: true,
|
|
|
|
filled: true,
|
|
|
|
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
focusColor:
|
|
|
|
|
|
|
|
Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(10))),
|
|
|
|
hintText: 'Email',
|
|
|
|
hintText: 'Email',
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(color: strokeTextField)),
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: strokeTextField)),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
bottom: 16.h,
|
|
|
|
|
|
|
|
left: defaultPadding,
|
|
|
|
|
|
|
|
right: defaultPadding),
|
|
|
|
child: TextFormField(
|
|
|
|
child: TextFormField(
|
|
|
|
controller: _passwordTextField,
|
|
|
|
controller: _passwordTextField,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
@ -170,21 +216,29 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
style: GoogleFonts.plusJakartaSans(color: primaryColor),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: primaryColor),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
prefix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
borderRadius:
|
|
|
|
suffix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
BorderRadius.all(Radius.circular(10))),
|
|
|
|
|
|
|
|
prefix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
|
|
|
|
suffix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
fillColor: bgTextField,
|
|
|
|
fillColor: bgTextField,
|
|
|
|
filled: true,
|
|
|
|
filled: true,
|
|
|
|
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
|
|
|
|
borderRadius:
|
|
|
|
|
|
|
|
BorderRadius.all(Radius.circular(10))),
|
|
|
|
hintText: 'Mot de passe',
|
|
|
|
hintText: 'Mot de passe',
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(color: strokeTextField),
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: strokeTextField),
|
|
|
|
suffixIcon: Container(
|
|
|
|
suffixIcon: Container(
|
|
|
|
padding: EdgeInsets.only(right: 10),
|
|
|
|
padding: EdgeInsets.only(right: 10),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
@ -204,8 +258,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
// Splash color over image
|
|
|
|
// Splash color over image
|
|
|
|
child: Image(
|
|
|
|
child: Image(
|
|
|
|
image: passenable
|
|
|
|
image: passenable
|
|
|
|
? AssetImage("assets/images/show_icon.png")
|
|
|
|
? AssetImage(
|
|
|
|
: AssetImage("assets/images/hide_icon.png"),
|
|
|
|
"assets/images/show_icon.png")
|
|
|
|
|
|
|
|
: AssetImage(
|
|
|
|
|
|
|
|
"assets/images/hide_icon.png"),
|
|
|
|
height: 2,
|
|
|
|
height: 2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
@ -213,7 +269,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
bottom: 16.h,
|
|
|
|
|
|
|
|
left: defaultPadding,
|
|
|
|
|
|
|
|
right: defaultPadding),
|
|
|
|
child: TextFormField(
|
|
|
|
child: TextFormField(
|
|
|
|
controller: _passwordConfirmTextField,
|
|
|
|
controller: _passwordConfirmTextField,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
|
keyboardAppearance: Brightness.dark,
|
|
|
@ -228,21 +287,29 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
cursorColor: primaryColor,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
style: GoogleFonts.plusJakartaSans(color: primaryColor),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: primaryColor),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
prefix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
borderRadius:
|
|
|
|
suffix: const Padding(padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
BorderRadius.all(Radius.circular(10))),
|
|
|
|
|
|
|
|
prefix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
|
|
|
|
suffix: const Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.0)),
|
|
|
|
fillColor: bgTextField,
|
|
|
|
fillColor: bgTextField,
|
|
|
|
filled: true,
|
|
|
|
filled: true,
|
|
|
|
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(width: 1, color: strokeTextField),
|
|
|
|
borderSide: BorderSide(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
width: 1, color: strokeTextField),
|
|
|
|
|
|
|
|
borderRadius:
|
|
|
|
|
|
|
|
BorderRadius.all(Radius.circular(10))),
|
|
|
|
hintText: 'Confirmation du Mot de passe',
|
|
|
|
hintText: 'Confirmation du Mot de passe',
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(color: strokeTextField),
|
|
|
|
hintStyle: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: strokeTextField),
|
|
|
|
suffixIcon: Container(
|
|
|
|
suffixIcon: Container(
|
|
|
|
padding: EdgeInsets.only(right: 10),
|
|
|
|
padding: EdgeInsets.only(right: 10),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
@ -262,8 +329,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
// Splash color over image
|
|
|
|
// Splash color over image
|
|
|
|
child: Image(
|
|
|
|
child: Image(
|
|
|
|
image: passenable
|
|
|
|
image: passenable
|
|
|
|
? AssetImage("assets/images/show_icon.png")
|
|
|
|
? AssetImage(
|
|
|
|
: AssetImage("assets/images/hide_icon.png"),
|
|
|
|
"assets/images/show_icon.png")
|
|
|
|
|
|
|
|
: AssetImage(
|
|
|
|
|
|
|
|
"assets/images/hide_icon.png"),
|
|
|
|
height: 2,
|
|
|
|
height: 2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
@ -271,7 +340,8 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: defaultPadding),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
|
|
|
horizontal: defaultPadding),
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
width: 600,
|
|
|
|
width: 600,
|
|
|
|
child: LoginButton(
|
|
|
|
child: LoginButton(
|
|
|
@ -292,12 +362,16 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
text: TextSpan(
|
|
|
|
text: TextSpan(
|
|
|
|
text: 'Tu as déjà un compte?',
|
|
|
|
text: 'Tu as déjà un compte?',
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
color: Colors.white, fontWeight: FontWeight.w400, fontSize: 15),
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
children: <TextSpan>[
|
|
|
|
children: <TextSpan>[
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: " Connexion",
|
|
|
|
text: " Connexion",
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
fontSize: 15, fontWeight: FontWeight.w400, color: primaryColor)),
|
|
|
|
fontSize: 15,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
|
|
|
color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -319,10 +393,13 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
|
|
|
left: defaultPadding, right: defaultPadding),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'Ou',
|
|
|
|
'Ou',
|
|
|
|
style: GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
@ -342,8 +419,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
child: SignInButton(
|
|
|
|
child: SignInButton(
|
|
|
|
Buttons.Google,
|
|
|
|
Buttons.Google,
|
|
|
|
text: "Login with Google",
|
|
|
|
text: "Login with Google",
|
|
|
|
onPressed: () {},
|
|
|
|
onPressed: signInWithGoogle,
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20))),
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
|
|
|
borderRadius:
|
|
|
|
|
|
|
|
BorderRadius.all(Radius.circular(20))),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -354,10 +433,13 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 240.h,
|
|
|
|
height: 240.h,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
gradient: LinearGradient(begin: Alignment.topRight, stops: [
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
0,
|
|
|
|
stops: [0, 1],
|
|
|
|
1
|
|
|
|
colors: [bgColor.withOpacity(1), bgColor.withOpacity(0)])),
|
|
|
|
], colors: [
|
|
|
|
|
|
|
|
bgColor.withOpacity(1),
|
|
|
|
|
|
|
|
bgColor.withOpacity(0)
|
|
|
|
|
|
|
|
])),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Align(
|
|
|
|
Align(
|
|
|
@ -365,7 +447,8 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
|
|
|
|
child: ConstrainedBox(
|
|
|
|
child: ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: 45.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
top: 45.h, left: defaultPadding, right: defaultPadding),
|
|
|
|
child: ClipRRect(
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
child: LinearProgressIndicator(
|
|
|
|
child: LinearProgressIndicator(
|
|
|
|