有沒有辦法讓 vscode 在使用 Flutter 時重新識別其檔案中的引數?
如您所見,可以參考布爾引數“重要”,而不能參考函式“onCrazyThingsDone”中的“瘋狂”引數。
我錯過了什么?我怎樣才能歸檔我也可以參考“瘋狂”?

uj5u.com熱心網友回復:
嘗試這個...
創建別名
// Documentation for Crazy callback here
typedef CrazyCallback = void Function(int crazy);
然后在你的函式中使用別名
// Documentation for doCrazyThings method.
Future<void> doCrazyThings({
required bool important,
CrazyCallback? onCrazyThingsDone,
}) async { ... }
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/528388.html
標籤:扑视觉工作室代码注释
上一篇:發布在2個表中,并帶有參考的列
