@@ -240,6 +240,36 @@ extension UIKitBackend {
240240 textFieldWidget. child. textColor = UIColor ( color: environment. suggestedForegroundColor)
241241 textFieldWidget. onChange = onChange
242242 textFieldWidget. onSubmit = onSubmit
243+
244+ switch environment. textContentType {
245+ case . text:
246+ textFieldWidget. child. keyboardType = . default
247+ textFieldWidget. child. textContentType = nil
248+ case . digits( ascii: false ) :
249+ textFieldWidget. child. keyboardType = . numberPad
250+ textFieldWidget. child. textContentType = nil
251+ case . digits( ascii: true ) :
252+ textFieldWidget. child. keyboardType = . asciiCapableNumberPad
253+ textFieldWidget. child. textContentType = nil
254+ case . url:
255+ textFieldWidget. child. keyboardType = . URL
256+ textFieldWidget. child. textContentType = . URL
257+ case . phoneNumber:
258+ textFieldWidget. child. keyboardType = . phonePad
259+ textFieldWidget. child. textContentType = . telephoneNumber
260+ case . name:
261+ textFieldWidget. child. keyboardType = . namePhonePad
262+ textFieldWidget. child. textContentType = . name
263+ case . decimal( signed: false ) :
264+ textFieldWidget. child. keyboardType = . decimalPad
265+ textFieldWidget. child. textContentType = nil
266+ case . decimal( signed: true ) :
267+ textFieldWidget. child. keyboardType = . numbersAndPunctuation
268+ textFieldWidget. child. textContentType = nil
269+ case . emailAddress:
270+ textFieldWidget. child. keyboardType = . emailAddress
271+ textFieldWidget. child. textContentType = . emailAddress
272+ }
243273
244274 #if os(iOS)
245275 if let updateToolbar = environment. updateToolbar {
0 commit comments