setScreenAliases method

Future<void> setScreenAliases(
  1. Map<String, String> aliases
)

Set screen aliases (raw screen name → friendly name)

Friendly names are applied Dart-side to automatic screen views emitted by GrovsNavigatorObserver, and the map is also synced to the Grovs dashboard by the native SDK. Key aliases by the raw screen name the observer emits (a route's RouteSettings.name, or the route-type fallback).

aliases - Map of raw screen name to friendly name.

Throws GrovsException if the operation fails.

Example:

await Grovs().setScreenAliases({'/p': 'Product', '/c': 'Cart'});

Implementation

Future<void> setScreenAliases(Map<String, String> aliases) {
  _screenAliases = Map<String, String>.from(aliases);
  return GrovsPlatform.instance.setScreenAliases(aliases);
}