flutter(Dart)是否具有类似于js绑定的功能?

时间:2018-12-18 13:25:15

标签: javascript dart flutter

flutter(Dart)是否具有类似于js绑定的功能? 我想做些类似的事情。

喜欢:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title></title>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
function handlerName(e) 
{
	alert(e.data.msg);
}
$(document).ready(function(){
	$("p").bind("click", {msg: "chicked!"}, handlerName)
});
</script>
</head>
<body>

<p>click me!</p>

</body>
</html>

1 个答案:

答案 0 :(得分:1)

在Dart中没有像bind这样的东西

但这可能也会满足您的要求:

onReady.listen((e) => handlerName(e, msg: 'clicked'))
相关问题