![](/img/trans.png)
[英]Pass coordinates Latlng from map widget to Void function in the same screen
[英]how to pass the void function from same widget to another widget and then return the same void function from another widget to same widget in flutter
我在當前小部件中編寫 void 函數,然后將該 void 函數傳遞給另一個使用 Inkwell 屬性的類,我在 ontap 中使用相同的 void 函數,以及如何將該 void 函數傳遞給當前小部件
這能回答你的問題嗎?
class One{
onTap(){
print('One');
}
}
class Two{
final dynamic onTap;
Two(this.onTap);
doSomthing(){
print('Two');
onTap();
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.