【问题标题】:Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null错误:不能在“字符串”上调用方法“replaceFirst”?因为它可能为空
【发布时间】:2021-02-06 18:42:23
【问题描述】:

需要帮助。

[ERROR]
material_localizations.dart:413:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null. Try calling using ?. instead.

).replaceFirst(r'$selectedRowCount', formatDecimal(selectedRowCount));
  ^^^^^^^^^^^^

material_localizations.dart:550:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null.
Try calling using ?. instead.

    ).replaceFirst(r'$licenseCount', formatDecimal(licenseCount));
      ^^^^^^^^^^^^

================================================ ============================

Flutter 医生 > 没有问题

================================================ ============================

【问题讨论】:

    标签: android flutter dart


    【解决方案1】:

    我在 Stackoverflow 上找到了另一个解决方案,即降级颤振,我在开发通道上,但它不能从命令中工作。手动重新下载后,它就像魅力一样工作。

    [插图]

    颤振通道稳定 颤振升级

    没用,所以:

    颤振通道稳定 接下来手动下载 zip 并再次解压。

    为我工作。

    【讨论】:

      猜你喜欢
      • 2021-12-26
      • 2021-08-06
      • 2022-06-25
      • 2021-12-30
      • 2022-11-12
      • 1970-01-01
      • 2022-01-14
      • 2021-08-25
      • 1970-01-01
      相关资源
      最近更新 更多