getTextInputType method
Implementation
TextInputType? getTextInputType(String fieldName) {
final editorItem = getEditorItemByFieldName(fieldName);
if (editorItem == null) return null;
switch (editorItem.type) {
case EEditorType.int:
case EEditorType.money:
return TextInputType.number;
case EEditorType.double:
return const TextInputType.numberWithOptions(decimal: true);
case EEditorType.phone:
return TextInputType.phone;
case EEditorType.email:
return TextInputType.emailAddress;
case EEditorType.datetime:
return TextInputType.datetime;
case EEditorType.name:
case EEditorType.string:
case EEditorType.image:
default:
return null;
}
}