Home > Net >  How to implement IOS 15 scan text feature in Flutter TextField
How to implement IOS 15 scan text feature in Flutter TextField

Time:02-24

I want to add ios 15's new scan text feature in my flutter textfield. I have set my target deployment as 15.2 for both project and podfile and yet the option is not coming like in the featured image. If anyone out there know how can it be done, it will be a great help.enter image description here

CodePudding user response:

What you need to know about Flutter is that Flutter UI components are not actual native UI components. They are rendered on the screen using Flutter's UI drawing engine called Skia which you can read more about here. Your best bet is to use the CupertinoTextField class from the Cupertino package in Flutter and see if it allows you to do the same thing otherwise what you'll need is to wait for Flutter developers to add that to the Flutter engine.

CodePudding user response:

It can be done using two techniques.

  1. You have to Write a swift code in Appdelegate file where you will define Swift's UITextField or UITextView and then call that swift code in flutter using Method Channel. 2.You can simply use Flutter Native Text Input package Click to see the package and it will do it for you.
  • Related