setUser static method

Future<void> setUser(
  1. RaygunUserInfo? raygunUserInfo
)

Sets the current user of your application.

If user is an email address which is associated with a Gravatar, their picture will be displayed in the error view.

If setUser is not called, a random ID will be assigned.

If the user context changes in your application (i.e log in/out), be sure to call this again with the updated user name/email address.

raygunUserInfo A RaygunUserInfo object containing the user data you want to send in its fields.

Set to null to clear

Implementation

static Future<void> setUser(RaygunUserInfo? raygunUserInfo) async {
  Settings.userInfo = raygunUserInfo ?? RaygunUserInfo();
}