nestedKey method

GetDelegate<T>? nestedKey(
  1. String? key
)

Nested key management for routing.

Returns a delegate associated with the provided key.

Implementation

GetDelegate<T>? nestedKey(String? key) {
  if (key == null) {
    return rootDelegate;
  }
  keys.putIfAbsent(
    key,
    () => GetDelegate<T>(
      showHashOnUrl: true,
      pages: RouteDecoder<T>.fromRoute(key).currentChildren ?? <GetPage<T>>[],
    ),
  );
  return keys[key];
}