【问题标题】:How to implement native code to autofill the OTP Text Field in iOS?如何实现本机代码以自动填充 iOS 中的 OTP 文本字段?
【发布时间】:2019-03-28 10:25:50
【问题描述】:

我正在尝试实现一个颤振插件,它可以帮助在 iOS 中自动填充文本字段。

根据iOS developer docs,我需要将UITextContentType设置为UITextContentType.oneTimeCode,如果我正在创建一个原生iOS App。

有没有办法为颤振文本字段设置此属性(UITextContentType.oneTimeCode),以便 iOS 可以识别它?

【问题讨论】:

    标签: ios flutter cross-platform


    【解决方案1】:

    Flutter 现在在稳定频道上支持自动填充 :) 您可能需要升级到 devmaster 频道 (flutter channel master)。

    您可以将autofillHints: const <String>[AutofillHints.oneTimeCode] 添加到您的文本字段中。

    稳定频道上的文档尚未更新。请参阅下面的主频道文档。 https://master-api.flutter.dev/flutter/services/AutofillHints/oneTimeCode-constant.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-10
      • 1970-01-01
      • 2018-03-27
      • 1970-01-01
      • 2011-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多