⚰️ remove useless SingleChidScrollView on login and signup

profile
remrem 2 years ago
parent 44c38bbdb7
commit 2aa6c43f5d

@ -72,8 +72,7 @@ class _MobileLoginView extends State<MobileLoginView> {
var media = MediaQuery.of(context).size; var media = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
backgroundColor: TColor.white, backgroundColor: TColor.white,
body: SingleChildScrollView( body: SafeArea(
child: SafeArea(
child: Container( child: Container(
height: media.height * 0.9, height: media.height * 0.9,
padding: const EdgeInsets.symmetric(horizontal: 20), padding: const EdgeInsets.symmetric(horizontal: 20),
@ -148,8 +147,7 @@ class _MobileLoginView extends State<MobileLoginView> {
title: "Se connecter", title: "Se connecter",
onPressed: () async { onPressed: () async {
if (!emailValidate || !passwordValidate) { if (!emailValidate || !passwordValidate) {
_printMsgError( _printMsgError("Les champs renseigné ne sont pas valide");
"Les champs renseigné ne sont pas valide");
return; return;
} }
Tuple2<bool, String> result = Tuple2<bool, String> result =
@ -285,7 +283,6 @@ class _MobileLoginView extends State<MobileLoginView> {
), ),
), ),
), ),
),
); );
} }
} }

@ -91,8 +91,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
var media = MediaQuery.of(context).size; var media = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
backgroundColor: TColor.white, backgroundColor: TColor.white,
body: SingleChildScrollView( body: SafeArea(
child: SafeArea(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20), padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column( child: Column(
@ -187,8 +186,7 @@ class _MobileSignUpView extends State<MobileSignUpView> {
if (!emailValidate || if (!emailValidate ||
!passwordValidate || !passwordValidate ||
!usernameValidate) { !usernameValidate) {
_printMsgError( _printMsgError("Les champs renseigné ne sont pas valide");
"Les champs renseigné ne sont pas valide");
return; return;
} }
@ -317,7 +315,6 @@ class _MobileSignUpView extends State<MobileSignUpView> {
), ),
), ),
), ),
),
); );
} }
} }

@ -73,8 +73,7 @@ class _WebLoginView extends State<WebLoginView> {
var media = MediaQuery.of(context).size; var media = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
backgroundColor: TColor.white, backgroundColor: TColor.white,
body: SingleChildScrollView( body: SafeArea(
child: SafeArea(
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 300), padding: const EdgeInsets.symmetric(horizontal: 300),
height: media.height, height: media.height,
@ -85,7 +84,7 @@ class _WebLoginView extends State<WebLoginView> {
height: media.width * 0.03, height: media.width * 0.03,
), ),
Text( Text(
"Bienvenue", "Bienvenue sur SmartFit",
style: TextStyle(color: TColor.gray, fontSize: 16), style: TextStyle(color: TColor.gray, fontSize: 16),
), ),
Text( Text(
@ -152,8 +151,7 @@ class _WebLoginView extends State<WebLoginView> {
title: "Se connecter", title: "Se connecter",
onPressed: () async { onPressed: () async {
if (!emailValidate || !passwordValidate) { if (!emailValidate || !passwordValidate) {
_printMsgError( _printMsgError("Les champs renseigné ne sont pas valide");
"Les champs renseigné ne sont pas valide");
return; return;
} }
Tuple2<bool, String> result = Tuple2<bool, String> result =
@ -182,7 +180,6 @@ class _WebLoginView extends State<WebLoginView> {
SizedBox( SizedBox(
height: media.width * 0.04, height: media.width * 0.04,
), ),
SizedBox( SizedBox(
height: media.width * 0.04, height: media.width * 0.04,
), ),
@ -217,7 +214,6 @@ class _WebLoginView extends State<WebLoginView> {
), ),
), ),
), ),
),
); );
} }
} }

@ -90,8 +90,7 @@ class _WebSignUpView extends State<WebSignUpView> {
var media = MediaQuery.of(context).size; var media = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
backgroundColor: TColor.white, backgroundColor: TColor.white,
body: SingleChildScrollView( body: SafeArea(
child: SafeArea(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 300), padding: const EdgeInsets.symmetric(horizontal: 300),
child: Column( child: Column(
@ -173,7 +172,6 @@ class _WebSignUpView extends State<WebSignUpView> {
) )
], ],
), ),
Visibility( Visibility(
visible: _errorCreateUser, visible: _errorCreateUser,
child: Text("Error - $_msgError", child: Text("Error - $_msgError",
@ -187,8 +185,7 @@ class _WebSignUpView extends State<WebSignUpView> {
if (!emailValidate || if (!emailValidate ||
!passwordValidate || !passwordValidate ||
!usernameValidate) { !usernameValidate) {
_printMsgError( _printMsgError("Les champs renseigné ne sont pas valide");
"Les champs renseigné ne sont pas valide");
return; return;
} }
Tuple2<bool, String> result = await util.createUser( Tuple2<bool, String> result = await util.createUser(
@ -207,7 +204,6 @@ class _WebSignUpView extends State<WebSignUpView> {
SizedBox( SizedBox(
height: media.width * 0.04, height: media.width * 0.04,
), ),
SizedBox( SizedBox(
height: media.width * 0.04, height: media.width * 0.04,
), ),
@ -245,7 +241,6 @@ class _WebSignUpView extends State<WebSignUpView> {
), ),
), ),
), ),
),
); );
} }
} }

Loading…
Cancel
Save