restoreBase method

void restoreBase(
  1. dynamic data
)

Restores navigation history from persisted data data should be a List<Map<String, dynamic>> containing route information

Implementation

void restoreBase(dynamic data) {
  try {
    final validatedRoutes = _validateAndParseRoutes(data);
    if (validatedRoutes.isEmpty) {
      debugPrint('No valid routes to restore');
      return;
    }

    replaceAll(validatedRoutes);
    debugPrint('Successfully restored ${validatedRoutes.length} routes');
  } catch (e) {
    debugPrint('Failed to restore navigation history: $e');
    // Consider fallback behavior like navigating to home route
    _handleRestorationFailure();
  }
}