SHARE
TWEET

Untitled

a guest Sep 17th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   Widget _buildEmailFieldSignIn(BuildContext context) {
  2.     return Container(
  3.       width: 320.0 ,
  4.       margin: EdgeInsets.only(bottom: 30.0),
  5.       padding: EdgeInsets.only(top:15.0,left:15.0, right:15.0),
  6.       color: GraphicsSettings.loginPageTextFieldBgColor,
  7.       child:  TextFormField(
  8.         textInputAction: TextInputAction.next,
  9.         onFieldSubmitted: (v){
  10.           FocusScope.of(context).requestFocus(myFocusNodePasswordLogin);
  11.         },
  12.         validator: (val) {
  13.           if (!EmailValidator.validate(val, true)) {
  14.             return Localization.of(context).trans('login_form_message_email_not_valid');
  15.           }
  16.           if (val.isEmpty) {
  17.             return Localization.of(context).trans('login_form_message_email_mandatory');
  18.           }
  19.           return null;
  20.         },
  21.         onSaved: (String val) {
  22.           _email = val;
  23.         },
  24.         focusNode: myFocusNodeEmailLogin,
  25.         controller: loginEmailController,
  26.         keyboardType: TextInputType.emailAddress,
  27.         style: TextStyle(
  28.           fontFamily: 'SF-Pro-Display',
  29.           fontSize: 17.0,
  30.           color: GraphicsSettings.loginPageTextFieldLabelColor,
  31.           backgroundColor: GraphicsSettings.loginPageTextFieldBgColor,
  32.         ),
  33.         decoration: InputDecoration(
  34.           border: InputBorder.none,
  35.           contentPadding: EdgeInsets.only(top:1.0),
  36.           icon: Icon(
  37.             FontAwesomeIcons.envelope,
  38.             color: GraphicsSettings.loginPageTextFieldIconColor,
  39.             size: 22.0,
  40.           ),
  41.           hintText: Localization.of(context).trans('login_email'),
  42.           hintStyle: TextStyle(
  43.               fontFamily: 'SF-Pro-Display',
  44.               fontSize: 17.0,
  45.               color: GraphicsSettings.loginPageTextFieldLabelColor
  46.           ),
  47.           helperText: "",
  48.           helperStyle: TextStyle(
  49.               fontFamily: 'SF-Pro-Display',
  50.               fontSize: 14.0,
  51.               fontWeight: FontWeight.bold
  52.           ),
  53.           errorStyle: TextStyle(
  54.               fontFamily: 'SF-Pro-Display',
  55.               fontSize: 14.0,
  56.               fontWeight: FontWeight.bold
  57.           ),
  58.  
  59.         ),
  60.       ),
  61.     );
  62.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top