convertInstances method

  1. @override
Object? convertInstances(
  1. InstanceManager manager,
  2. Object? object
)
override

Converts objects to PairedInstances with ids stored in manager.

Conversions:

  • Objects paired in a TypeChannelMessenger are converted to their paired PairedInstance.
  • Lists are converted to List<Object?> and this method is applied to each value within the list.
  • Maps are converted to Map<Object?, Object?> and this method is applied to each key and each value.

Implementation

@override
Object? convertInstances(InstanceManager manager, Object? object) {
  if (object is Uint8List ||
      object is Int32List ||
      object is Int64List ||
      object is Float64List) {
    return object;
  }

  return super.convertInstances(manager, object);
}