Dart的外部含义是什么? [英] What does external mean in Dart?
问题描述
Dart中的 external
是什么意思?例如:外部DateTime._now();
What does external
mean in Dart? For example: external DateTime._now();
我是Dart的新手,我找不到有关 external
的文档,所以您能举个例子来帮助解释吗?
I'm new to Dart, I can't find documentation for external
, so can you give an example to help explain?
推荐答案
9.4外部功能
外部函数是其主体与其主体分开提供的函数.宣言.外部函数可以是顶级函数(17),一种方法
9.4 External Functions
An external function is a function whose body is provided separately from its
declaration. An external function may be a top-level function (17), a method
函数的主体在其他地方定义.
据我所知,这用于修复浏览器中的Dart VM和服务器上的Dart VM的不同实现.
The body of the function is defined somewhere else.
As far as I know this is used to fix different implementations for Dart VM in the browser and Dart VM on the Server.
这篇关于Dart的外部含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!