You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
236 lines
8.4 KiB
236 lines
8.4 KiB
import 'package:flutter_svg/svg.dart';
|
|
import 'package:smartfit_app_mobile/common/colo_extension.dart';
|
|
import 'package:smartfit_app_mobile/common_widget/round_button.dart';
|
|
import 'package:smartfit_app_mobile/common_widget/round_text_field.dart';
|
|
//import 'package:smartfit_app_mobile/view/login/complete_profile_view.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:smartfit_app_mobile/view/main_tab/main_tab_view.dart';
|
|
|
|
class SignUpView extends StatefulWidget {
|
|
const SignUpView({super.key});
|
|
|
|
@override
|
|
State<SignUpView> createState() => _SignUpViewState();
|
|
}
|
|
|
|
class _SignUpViewState extends State<SignUpView> {
|
|
bool isCheck = false;
|
|
|
|
final controllerTextEmail = TextEditingController();
|
|
final controllerTextUsername = TextEditingController();
|
|
final controllerTextPassword = TextEditingController();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var media = MediaQuery.of(context).size;
|
|
return Scaffold(
|
|
backgroundColor: TColor.white,
|
|
body: SingleChildScrollView(
|
|
child: SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
"Bienvenue,",
|
|
style: TextStyle(color: TColor.gray, fontSize: 16),
|
|
),
|
|
Text(
|
|
"Créer un compte",
|
|
style: TextStyle(
|
|
color: TColor.black,
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w700),
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.05,
|
|
),
|
|
const RoundTextField(
|
|
hitText: "Prénom",
|
|
icon: "assets/img/user_text.svg",
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
const RoundTextField(
|
|
hitText: "Nom",
|
|
icon: "assets/img/user_text.svg",
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
RoundTextField(
|
|
hitText: "Email",
|
|
icon: "assets/img/email.svg",
|
|
keyboardType: TextInputType.emailAddress,
|
|
controller: controllerTextEmail,
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
RoundTextField(
|
|
hitText: "Mot de passe",
|
|
icon: "assets/img/lock.svg",
|
|
obscureText: true,
|
|
controller: controllerTextPassword,
|
|
rigtIcon: TextButton(
|
|
onPressed: () {},
|
|
child: Container(
|
|
alignment: Alignment.center,
|
|
width: 20,
|
|
height: 20,
|
|
child: SvgPicture.asset(
|
|
"assets/img/show_password.svg",
|
|
width: 20,
|
|
height: 20,
|
|
fit: BoxFit.contain,
|
|
))),
|
|
),
|
|
Row(
|
|
// crossAxisAlignment: CrossAxisAlignment.,
|
|
children: [
|
|
IconButton(
|
|
onPressed: () {
|
|
setState(() {
|
|
isCheck = !isCheck;
|
|
});
|
|
},
|
|
icon: Icon(
|
|
isCheck
|
|
? Icons.check_box_outlined
|
|
: Icons.check_box_outline_blank_outlined,
|
|
color: TColor.gray,
|
|
size: 20,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 8),
|
|
child: Text(
|
|
"En continuant, vous acceptez notre Politique de\nconfidentialité et nos Conditions d'utilisation.",
|
|
style: TextStyle(color: TColor.gray, fontSize: 10),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.4,
|
|
),
|
|
RoundButton(title: "Créer un compte", onPressed: () {}),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
Row(
|
|
// crossAxisAlignment: CrossAxisAlignment.,
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
height: 1,
|
|
color: TColor.gray.withOpacity(0.5),
|
|
)),
|
|
Text(
|
|
" Ou ",
|
|
style: TextStyle(color: TColor.black, fontSize: 12),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
height: 1,
|
|
color: TColor.gray.withOpacity(0.5),
|
|
)),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
GestureDetector(
|
|
onTap: () {},
|
|
child: Container(
|
|
width: 50,
|
|
height: 50,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: TColor.white,
|
|
border: Border.all(
|
|
width: 1,
|
|
color: TColor.gray.withOpacity(0.4),
|
|
),
|
|
borderRadius: BorderRadius.circular(15),
|
|
),
|
|
child: Image.asset(
|
|
"assets/img/google.png",
|
|
width: 20,
|
|
height: 20,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: media.width * 0.04,
|
|
),
|
|
GestureDetector(
|
|
onTap: () {},
|
|
child: Container(
|
|
width: 50,
|
|
height: 50,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: TColor.white,
|
|
border: Border.all(
|
|
width: 1,
|
|
color: TColor.gray.withOpacity(0.4),
|
|
),
|
|
borderRadius: BorderRadius.circular(15),
|
|
),
|
|
child: Image.asset(
|
|
"assets/img/suunto.png",
|
|
width: 35,
|
|
height: 35,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
TextButton(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const MainTabView()));
|
|
},
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Text(
|
|
"Vous avez déjà un compte ? ",
|
|
style: TextStyle(
|
|
color: TColor.black,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
Text(
|
|
"Se connecter",
|
|
style: TextStyle(
|
|
color: TColor.black,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w700),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: media.width * 0.04,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|