setContext method

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

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

@override
Future<void> setContext(String? context) => client.setContext(context);