Runtime class

Constructors

Runtime()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
loadBaseJsConstant List<bool>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addScript(String pageName, String scriptSource, dynamic props) Future
添加脚本文件
bindCallback(String key, RuntimeCallback callback) → void
executeScript(String pageName, String script) Future
执行指定脚本语句;script为脚本语句
executeScriptSync(String pageName, String script) Map<String, String>
同步执行脚本语句
getBasicChannel() MethodChannel
getBindVariableAndFunc(String pageName) Future<Map>
getBindVariableAndFuncSync(String pageName) Map
获取指定页面的所有变量和方法
getChannel() → FairMessageChannel
init(bool isDebug) → void
初始化
invokeMethod(String pageName, String funcName, List? parameters) Future<String>
异步方法调用 pageName 页面名称 funcName js侧方法名称 parameters 方法参数
invokeMethodSync(String pageName, String funcName, List? parameters) String
同步方法调用 pageName 页面名称 funcName js侧方法名称 parameters 方法参数
loadCoreJs({String? package, Map<String, String>? jsPlugins, List<String>? baseJsSources}) Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(String? pageName) → void
释放资源
setJsLoadListener() → void
toString() String
A string representation of this object.
inherited
variables(String pageName, Map variableNames) Future<String>
异步读取变量,key可以指定读取的内容,如果不指定返回所有变量;返回值为空间域变量Json eg: { "pageName": "helloWorld", "type": "variable", "args": { "num": 10, "string": "12580", "object": { "array": "1", "2", "3", "num": 123 } } }
variablesSync(String pageName, Map variableNames) String
同步读取变量,返回值为空间域变量Json
version() Future<String>
获取JS侧版本号

Operators

operator ==(Object other) bool
The equality operator.
inherited