Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
4 years agoAutofill password field not triggering on (Android devices) for Flutter
Password field in Flutter, working fine with Iphones but for Android the password field is never autofilling.
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: No...
Former Member
3 years agoHey ricardoboss!. I've basically just adapted what's in this Flutter guide:
https://docs.flutter.dev/development/platform-integration/android/platform-views
The difference is that I created the text fields in the Kotlin code rather than Dart. The relevant part is that I created a NativeView.kt class where I initialize the text field:
```
internal class NativeView(context: Context, id: Int, creationParams: Map
PlatformView {
private val textView: EditText
override fun getView(): View {
return textView
}
override fun dispose() {}
init {
textView = android.widget.EditText(context)
textView.setHint("username")
textView.setAutofillHints(android.view.View.AUTOFILL_HINT_EMAIL_ADDRESS)
textView.setBackgroundColor(Color.rgb(230, 230, 250))
textView.setGravity(android.view.Gravity.CENTER)
}
```
Then I refer to the view in the Dart code, rather than using the TextField widget.
That said, hopefully we can get something better than this workaround out as a solution. I'll keep you all posted here!