initMixInstance method

Future<void> initMixInstance(
  1. String typeName,
  2. MixInstance instance,
  3. dynamic arguments
)

Implementation

Future<void> initMixInstance(
  String typeName,
  MixInstance instance,
  dynamic arguments,
) {
  final maps = {"typeName": typeName, "hash": instance.hashCode};
  //
  if (arguments != null) maps["arguments"] = arguments;
  //
  return _synchronized(
    () => _channel.invokeMethod("instance", maps),
  ).then(
    (_) {
      final key = _key(typeName, instance.hashCode);
      _cachesMap[key] = instance;
    },
  );
}