performNavigation method

Future<void> performNavigation(
  1. String routeName, {
  2. Object? data,
})

Implementation

Future<void> performNavigation(String routeName, {Object? data}) async {
  __.in_('performNavigation');
  try {
    if (_navigationService == null) {
      __.severe('Navigation service not available');
      return;
    }

    // Navigate using the route name
    await _navigationService?.navigateTo(routeName, arguments: data);
    __.info('Navigated to: $routeName');
  } catch (e, stackTrace) {
    __.severe('Navigation failed', e, stackTrace);
  } finally {
    __.out_('performNavigation');
  }
}