簡體   English   中英

Flutter 名稱 FutureOr 不是類型,因此不能在 as 表達式中使用

[英]Flutter The name FutureOr isn't a type, so it can't be used in an as expression

在將 flutter 項目升級到零安全時,它出現了以下錯誤

    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'

在此處輸入圖像描述

看起來 import 缺少import 'dart:async';

FutureOr 是dart:async的一部分

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM