【问题标题】:Flutter The name FutureOr isn't a type, so it can't be used in an as expressionFlutter 名称 FutureOr 不是类型,因此不能在 as 表达式中使用
【发布时间】:2021-08-23 14:05:04
【问题描述】:

在将颤振项目升级到空安全时出现以下错误

    The name 'FutureOr' isn't a type, so it can't be used in an 'as' expression.
Try changing the name to the name of an existing type, or creating a type with the name 'FutureOr'

【问题讨论】:

    标签: flutter dart-null-safety


    【解决方案1】:

    似乎缺少导入 import 'dart:async';

    FutureOr 是dart:async 的一部分

    【讨论】:

      猜你喜欢
      • 2020-09-26
      • 2021-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-15
      • 2021-08-02
      • 2018-09-22
      • 1970-01-01
      相关资源
      最近更新 更多