Skip to content

Instantly share code, notes, and snippets.

@bettdouglas
Created June 19, 2019 13:27
Show Gist options
  • Save bettdouglas/f32a010409d431665c08ffb047de33fc to your computer and use it in GitHub Desktop.
Save bettdouglas/f32a010409d431665c08ffb047de33fc to your computer and use it in GitHub Desktop.
Widget build(BuildContext context) {
return TextFormField(
controller: widget.controller,
keyboardType: keyBoardType(widget.type),
validator: (str)=>validator(str), ///this is a function which returns the error message we defined using the validator object
decoration: InputDecoration(
hintText: widget.hint,
labelText: widget.label,
helperText: widget.hint,
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment