getTextInputType method
Implementation
TextInputType getTextInputType(String? inputType) {
inputType ??= "default";
switch (inputType) {
case "datetime":
return TextInputType.datetime;
case "email":
return TextInputType.emailAddress;
case "multiline":
return TextInputType.multiline;
case "name":
return TextInputType.name;
case "number":
return TextInputType.number;
case "int":
return const TextInputType.numberWithOptions(
signed: false, decimal: false);
case "decimal":
return const TextInputType.numberWithOptions(
signed: false, decimal: true);
case "phone":
return TextInputType.phone;
case "url":
return TextInputType.url;
case "password":
return TextInputType.visiblePassword;
default:
return TextInputType.text;
}
}