Created
December 14, 2022 01:08
-
-
Save josue1dario2/785702744c61e472a0fb9a8da5dfb045 to your computer and use it in GitHub Desktop.
FormScreen Flutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormScreen extends StatelessWidget { | |
const FormScreen({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
final double widthScreem = MediaQuery.of(context).size.width; | |
final double heightScreem = MediaQuery.of(context).size.height; | |
return Scaffold( | |
body: Center( | |
child: SizedBox( | |
height: heightScreem * .1, | |
width: widthScreem, | |
child: Row( | |
children: [ | |
_textField(context), | |
const ValidatorButton(navigator: Validator()) | |
], | |
), | |
)), | |
); | |
} | |
} | |
Widget _textField(context) { | |
final double widthScreem = MediaQuery.of(context).size.width; | |
return Padding( | |
padding: const EdgeInsets.only(left: 20), | |
child: SizedBox( | |
width: widthScreem * .78, | |
child: const TextField( | |
autofocus: true, | |
//controller: codeController, | |
textAlign: TextAlign.center, | |
style: TextStyle(fontSize: 20.0), | |
decoration: InputDecoration( | |
//hintText: textFieldValue.getTextFieldGame, | |
hintStyle: TextStyle(fontSize: 20.0, color: Colors.black38), | |
enabledBorder: OutlineInputBorder( | |
borderSide: | |
BorderSide(color: Color.fromRGBO(21, 21, 21, 1), width: 1.0), | |
), | |
focusedBorder: OutlineInputBorder( | |
borderSide: | |
BorderSide(color: Color.fromRGBO(21, 21, 21, 1), width: 2.0), | |
), | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment