copy method

  1. @visibleForOverriding
ModularRoute copy(
  1. ModularRoute parent,
  2. ModularRoute route
)
inherited

Implementation

@visibleForOverriding
ModularRoute copy(ModularRoute parent, ModularRoute route) {
  final newName = '${parent.name}${route.name}'.replaceFirst('//', '/');
  return route.copyWith(
    name: newName,
    middlewares: [
      ...parent.middlewares,
      ...route.middlewares,
    ],
    bindContextEntries: {
      ...parent.bindContextEntries,
      ...route.bindContextEntries,
    },
  );
}