createNewInstancePair method

Future<PairedInstance?> createNewInstancePair(
  1. T instance,
  2. List<Object?> arguments, {
  3. required bool owner,
})

Creates a new PairedInstance to be paired with instance.

Sends a message to another TypeChannelMessenger to instantiate an object for TypeChannel with named with name.

Returns null if a pair with instance has already been added to messenger. Otherwise, it returns the paired PairedInstance.

Implementation

Future<PairedInstance?> createNewInstancePair(
  T instance,
  List<Object?> arguments, {
  required bool owner,
}) {
  return messenger.createNewInstancePair(
    name,
    instance,
    arguments,
    owner: owner,
  );
}