VmValue.forFunction constructor
VmValue.forFunction({
- String identifier = '___anonymousVmFunction___',
- bool? isIniter,
- bool? isStatic,
- bool? isGetter,
- bool? isSetter,
- List<
VmHelper> ? listArguments, - List<
VmHelper> ? nameArguments, - List<
Map< ? initTree,VmKeys, dynamic> ?> - Map<
VmKeys, dynamic> ? bodyTree, - required dynamic staticListener(),
- required dynamic instanceListener(),
创建函数值
Implementation
factory VmValue.forFunction({
String identifier = '___anonymousVmFunction___',
bool? isIniter,
bool? isStatic,
bool? isGetter,
bool? isSetter,
List<VmHelper>? listArguments,
List<VmHelper>? nameArguments,
List<Map<VmKeys, dynamic>?>? initTree,
Map<VmKeys, dynamic>? bodyTree,
required dynamic Function(List<dynamic>? positionalArguments, Map<Symbol, dynamic>? namedArguments, VmClass staticScope, List<Map<VmKeys, dynamic>>? instanceFields, VmValue method) staticListener,
required dynamic Function(List<dynamic>? positionalArguments, Map<Symbol, dynamic>? namedArguments, VmClass? staticScope, VmValue? instanceScope, VmValue method) instanceListener,
}) {
return VmValue._(
identifier: identifier,
metaType: VmMetaType.internalApply,
metaData: VmMetaData(
isIniter: isIniter ?? false,
isStatic: isStatic ?? false,
isGetter: isGetter ?? false,
isSetter: isSetter ?? false,
listArguments: listArguments ?? const [],
nameArguments: nameArguments ?? const [],
initTree: initTree ?? const [],
bodyTree: bodyTree ?? const {},
staticListener: staticListener,
instanceListener: instanceListener,
),
valueType: VmClass._getClassByTypeName(VmClass.functionTypeName),
valueData: null,
);
}