toKeyBoardType static method
Implementation
static TextInputType? toKeyBoardType(dynamic value) {
if (value is! String) return null;
return switch (value) {
'text' => TextInputType.text,
'multiline' => TextInputType.multiline,
'number' => TextInputType.number,
'phone' => TextInputType.phone,
'datetime' => TextInputType.datetime,
'emailAddress' => TextInputType.emailAddress,
'url' => TextInputType.url,
'visiblePassword' => TextInputType.visiblePassword,
'name' => TextInputType.name,
'streetAddress' => TextInputType.streetAddress,
'none' => TextInputType.none,
_ => null
};
}