hasCallbackConstructor method

bool hasCallbackConstructor()

Whether the API has a method that callbacks to Dart to add a new instance to the InstanceManager.

This is possible as long as no callback methods are required to instantiate the class.

Implementation

bool hasCallbackConstructor() {
  return flutterMethods
      .followedBy(flutterMethodsFromSuperClasses())
      .followedBy(flutterMethodsFromInterfaces())
      .every((Method method) => !method.isRequired);
}