invoke method

Object? invoke(
  1. String instanceHash,
  2. String memberName,
  3. List positionalArguments, [
  4. Map<Symbol, dynamic>? namedArguments,
])

Implementation

Object? invoke(
  String instanceHash,
  String memberName,
  List<dynamic> positionalArguments, [
  Map<Symbol, dynamic>? namedArguments,
]) {
  if (instances[instanceHash] == null) {
    throw Exception(
      "Can't call $memberName() function because no any object is registered for $instanceHash",
    );
  }
  return instances[instanceHash]!
      .init()
      .invoke(memberName, positionalArguments, namedArguments);
}