setContext abstract method

Future<void> setContext(
  1. String? context
)

Bugsnag uses the concept of “contexts” to help display and group your errors. The context represents what was happening in your application at the time an error occurs and is given high visual prominence in the dashboard.

The "context" can be made to follow your app navigation by using the BugsnagNavigatorObserver in your application of Navigator:

return MaterialApp(
  navigatorObservers: [BugsnagNavigatorObserver(setContext: true)],

See also:

Implementation

Future<void> setContext(String? context);