Last active
August 25, 2019 23:13
-
-
Save kleberandrade/0d609254f760bd1a7df7628143d14b15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
TextEditingController _weightController = TextEditingController(); | |
TextEditingController _heightController = TextEditingController(); | |
TextFormField buildTextFormField({TextEditingController controller, String error, String label}) { | |
return TextFormField( | |
keyboardType: TextInputType.number, | |
decoration: InputDecoration(labelText: label), | |
controller: controller, | |
validator: (text) { | |
return text.isEmpty ? error : null; | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment