Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Oct 9, 2023
1 parent 9e07c77 commit 3cef7aa
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FlutterEnricherEventProcessor implements EventProcessor {

final app = contexts.app;
if (app != null) {
_getAppScreen(contexts, app);
contexts.app = _appWithCurrentRouteViewName(app);
}

// Flutter has a lot of Accessibility Settings available and exposes them
Expand Down Expand Up @@ -244,12 +244,14 @@ class FlutterEnricherEventProcessor implements EventProcessor {
);
}

void _getAppScreen(Contexts contexts, SentryApp app) {
SentryApp _appWithCurrentRouteViewName(SentryApp app) {
final currentRouteName = SentryNavigatorObserver.currentRouteName;
if (currentRouteName != null) {
final viewNames = app.viewNames ?? [];
viewNames.add(currentRouteName);
contexts.app = app.copyWith(viewNames: viewNames);
return app.copyWith(viewNames: viewNames);
} else {
return app;
}
}
}

0 comments on commit 3cef7aa

Please sign in to comment.