provide_deprecation_message工具 chevron_right診斷 chevron_rightprovide_deprecation_message 目錄描述示例常見修復 toggle_on Lint 規則缺少棄用訊息。描述#當使用 deprecated 註解而非 Deprecated 註解時,分析器會生成此診斷。示例#以下程式碼產生此診斷,因為函式 f 使用了 deprecated 註解dart@deprecated void f() {}常見修復#將程式碼轉換為使用更長的形式dart@Deprecated('Use g instead. Will be removed in 4.0.0.') void f() {}此頁面內容有幫助嗎?thumb_up thumb_down感謝您的反饋! feedback 提供詳細資訊感謝您的反饋!請告訴我們如何改進。 bug_report 提供詳細資訊除非另有說明,本網站文件反映 Dart 3.8.1。頁面最後更新於 2025-05-08。 檢視原始碼 或 報告問題。