addPath<T extends Portable> method

void addPath<T extends Portable>(
  1. String path, {
  2. required Portable factory(),
  3. String? identity,
  4. ApiScope? permissions,
})

Register a path with a factory that constructs the Portable instance

Implementation

void addPath<T extends Portable>(
  String path, {
  required Portable Function() factory,
  String? identity,
  ApiScope? permissions,
}) {
  paths.add(
    ServicePath<T>(
      path: path,
      factory: factory,
      identity: identity,
      permissions: permissions,
    ),
  );
}