type_test_with_undefined_name工具 chevron_right診斷 chevron_righttype_test_with_undefined_name 目錄描述示例常見修復方法名稱“{0}”未定義,因此無法在“is”表示式中使用。描述#當型別測試表達式中 is 後面的名稱未定義時,分析器會生成此診斷資訊。示例#以下程式碼生成此診斷資訊是因為名稱 Srting 未定義dartvoid f(Object o) { if (o is Srting) { // ... } }常見修復方法#將名稱替換為型別名稱dartvoid f(Object o) { if (o is String) { // ... } }本頁面內容有幫助嗎?thumb_up thumb_down感謝您的反饋! feedback 提供詳細資訊感謝您的反饋!請告訴我們如何改進。 bug_report 提供詳細資訊除非另有說明,本網站文件反映 Dart 3.8.1 版本。頁面最後更新時間:2025-05-08。 檢視原始碼 或 報告問題。