|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:dafl_project_flutter/spotify_api/api.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:page_transition/page_transition.dart';
|
|
|
|
|
import '../home/p_home.dart';
|
|
|
|
@ -11,16 +12,18 @@ class SignUpPage extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
|
|
|
|
|
Color boxColor = Colors.white;
|
|
|
|
|
bool isHovering = false;
|
|
|
|
|
@override
|
|
|
|
|
TextEditingController passwordconfirm = new TextEditingController();
|
|
|
|
|
TextEditingController passwordconfirm = TextEditingController();
|
|
|
|
|
bool isChecked = false;
|
|
|
|
|
Api apiSptfy = Api();
|
|
|
|
|
Future<void>? _launched;
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double width = MediaQuery.of(context).size.width;
|
|
|
|
|
return Scaffold(
|
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
|
backgroundColor: Color(0xFF141414),
|
|
|
|
|
backgroundColor: const Color(0xFF141414),
|
|
|
|
|
body: Stack(
|
|
|
|
|
alignment: AlignmentDirectional.topCenter,
|
|
|
|
|
children: <Widget>[
|
|
|
|
@ -34,40 +37,49 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/Logo.png',
|
|
|
|
|
width: 250,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 45,),
|
|
|
|
|
Text(
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 45,
|
|
|
|
|
),
|
|
|
|
|
const Text(
|
|
|
|
|
"S'INSCRIRE",
|
|
|
|
|
style: TextStyle(fontFamily: 'DMSans', color: Colors.white ,fontSize: 23, fontWeight: FontWeight.w700),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: 'DMSans',
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 23,
|
|
|
|
|
fontWeight: FontWeight.w700),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10,),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: 500,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(45, 0, 45, 0),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(45, 0, 45, 0),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(50)),
|
|
|
|
|
borderRadius:
|
|
|
|
|
const BorderRadius.all(Radius.circular(50)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.3),
|
|
|
|
|
spreadRadius: 5,
|
|
|
|
|
blurRadius: 7,
|
|
|
|
|
offset: Offset(0, 3), // changes position of shadow
|
|
|
|
|
offset: const Offset(
|
|
|
|
|
0, 3), // changes position of shadow
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
const Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
@ -77,7 +89,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
margin: const EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/profil_logo.png',
|
|
|
|
|
height: 16,
|
|
|
|
@ -86,31 +98,31 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
width: 500,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(50)),
|
|
|
|
|
borderRadius:
|
|
|
|
|
const BorderRadius.all(Radius.circular(50)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.3),
|
|
|
|
|
spreadRadius: 5,
|
|
|
|
|
blurRadius: 7,
|
|
|
|
|
offset: Offset(0, 3), // changes position of shadow
|
|
|
|
|
offset: const Offset(
|
|
|
|
|
0, 3), // changes position of shadow
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
),
|
|
|
|
|
const Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
@ -120,7 +132,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
margin: const EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/password_logo.png',
|
|
|
|
|
height: 16,
|
|
|
|
@ -129,34 +141,34 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
width: 500,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(50)),
|
|
|
|
|
borderRadius:
|
|
|
|
|
const BorderRadius.all(Radius.circular(50)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.3),
|
|
|
|
|
spreadRadius: 5,
|
|
|
|
|
blurRadius: 7,
|
|
|
|
|
offset: Offset(0, 3), // changes position of shadow
|
|
|
|
|
offset: const Offset(
|
|
|
|
|
0, 3), // changes position of shadow
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(50, 0, 20, 0),
|
|
|
|
|
child: TextField(
|
|
|
|
|
controller: passwordconfirm,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
decoration: const InputDecoration(
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
|
),
|
|
|
|
|
cursorColor: Colors.purple,
|
|
|
|
@ -164,7 +176,7 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
margin: const EdgeInsets.fromLTRB(15, 12, 0, 0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/password_logo.png',
|
|
|
|
|
height: 16,
|
|
|
|
@ -173,39 +185,56 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
width: 500,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(45, 10, 45, 0),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xFF24CF5F),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(50)),
|
|
|
|
|
color: const Color(0xFF24CF5F),
|
|
|
|
|
borderRadius:
|
|
|
|
|
const BorderRadius.all(Radius.circular(50)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.3),
|
|
|
|
|
spreadRadius: 5,
|
|
|
|
|
blurRadius: 7,
|
|
|
|
|
offset: Offset(0, 3), // changes position of shadow
|
|
|
|
|
offset: const Offset(
|
|
|
|
|
0, 3), // changes position of shadow
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 55,
|
|
|
|
|
width: width * 0.75,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 10, 10, 0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
ElevatedButton(
|
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
|
backgroundColor: const Color(0xFF24CF5F),
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onPressed: () => setState(() {
|
|
|
|
|
_launched = apiSptfy.launchInBrowser();
|
|
|
|
|
}),
|
|
|
|
|
child: const Text(
|
|
|
|
|
"Lier compte ",
|
|
|
|
|
style: TextStyle(fontFamily: 'DMSans', color: Colors.white ,fontSize: 18, fontWeight: FontWeight.w700),
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: 'DMSans',
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.w700),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/spotify_logo.png',
|
|
|
|
@ -214,42 +243,35 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
)),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 30,),
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(22),
|
|
|
|
|
|
|
|
|
|
child: Material(
|
|
|
|
|
|
|
|
|
|
child: InkWell(
|
|
|
|
|
highlightColor: Colors.grey.shade100,
|
|
|
|
|
splashColor: Color(0xFF406DE1),
|
|
|
|
|
splashColor: const Color(0xFF406DE1),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
boxColor = Colors.blue;
|
|
|
|
|
});
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
PageTransition(
|
|
|
|
|
duration: Duration(milliseconds: 300),
|
|
|
|
|
reverseDuration: Duration(milliseconds: 300),
|
|
|
|
|
duration: const Duration(milliseconds: 300),
|
|
|
|
|
reverseDuration: const Duration(milliseconds: 300),
|
|
|
|
|
type: PageTransitionType.leftToRightJoined,
|
|
|
|
|
childCurrent: widget,
|
|
|
|
|
child: HomePage()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Ink(
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/valid_logo.png',
|
|
|
|
|
width: 47,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
|
|
|
|
|
width: 83,
|
|
|
|
|
height: 83,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
@ -259,47 +281,70 @@ class _SignUpPageState extends State<SignUpPage> {
|
|
|
|
|
color: Colors.black.withOpacity(0.3),
|
|
|
|
|
spreadRadius: 5,
|
|
|
|
|
blurRadius: 7,
|
|
|
|
|
offset: Offset(0, 3), // changes position of shadow
|
|
|
|
|
offset: const Offset(
|
|
|
|
|
0, 3), // changes position of shadow
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/valid_logo.png',
|
|
|
|
|
width: 47,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 100,),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 100,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Text('Tu n’as déjà un compte?', style: TextStyle(color: Colors.white, fontWeight: FontWeight.normal, fontSize: 17)),
|
|
|
|
|
const Text('Tu n’as déjà un compte?',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: 17)),
|
|
|
|
|
GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
PageTransition(
|
|
|
|
|
type: PageTransitionType.fade,
|
|
|
|
|
childCurrent: widget,
|
|
|
|
|
child: SignInPage()),
|
|
|
|
|
child: const SignInPage()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Text(' se connecter', style: TextStyle(color: Color(0xFF406DE1), fontWeight: FontWeight.normal, fontSize: 16),
|
|
|
|
|
child: const Text(
|
|
|
|
|
' se connecter',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xFF406DE1),
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: 16),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 60,),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Align(
|
|
|
|
|
alignment: Alignment.topRight,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 20, 20, 0),
|
|
|
|
|
child: Text("v1.0",
|
|
|
|
|
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.5) ,fontSize: 17, fontWeight: FontWeight.w700),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(0, 20, 20, 0),
|
|
|
|
|
child: Text(
|
|
|
|
|
"v1.0",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: 'DMSans',
|
|
|
|
|
color: Colors.white.withOpacity(0.5),
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
fontWeight: FontWeight.w700),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|