registerSubtype method

void registerSubtype(
  1. ResourceRegistration<Resource> registration
)

Register a new resource with the SDK

Implementation

void registerSubtype(ResourceRegistration registration) {
  if (subtypes.containsKey(registration.subtype)) {
    throw Exception('Duplicate registration of subtype in registry');
  }
  subtypes[registration.subtype] = registration;
}