addModule method

  1. @override
ModularRoute addModule(
  1. String name, {
  2. required RouteContext module,
})
inherited

Create a new Route by adding a RouteContext to the context.

Implementation

@override
ModularRoute addModule(String name, {required RouteContext module}) {
  final bindContextEntries = {module.runtimeType: module};

  return copyWith(
    name: name,
    uri: Uri.parse(name),
    bindContextEntries: bindContextEntries,
    context: module,
  );
}