【问题标题】:Create Function Contructor in Dart / Flutter ,Like new Function in javascript在 Dart / Flutter 中创建函数构造函数,就像 javascript 中的新函数一样
【发布时间】:2022-08-15 23:06:46
【问题描述】:

在javascript中,我们可以构造函数

IE。

const new_function = new Function(arguments, body);
const x = new_function(xxx);

count 找不到在颤振或飞镖中创建函数的方法。 如果有人可以指导我,我会很幸运。

  • 如果它没有返回任何特定值,您可以使用void

标签: flutter dart


【解决方案1】:

您可以创建这样的函数和回调值

  final Function(int data, String args) myfun;

【讨论】:

    猜你喜欢
    • 2018-12-03
    • 1970-01-01
    • 1970-01-01
    • 2020-10-30
    • 1970-01-01
    • 2012-09-28
    • 1970-01-01
    • 1970-01-01
    • 2021-12-25
    相关资源
    最近更新 更多