userProperty method

void userProperty({
  1. required String property,
  2. required String? value,
})

Sets a user property and value that persists throughout the app.

This applies to your possible _analyticsInterface as well as your _crashReportsInterface.

Implementation

void userProperty({required String property, required String? value}) {
  _eventBus.tryAddAnalytic(
    Loglytics._analyticsInterface?.setUserProperty(
      name: property,
      value: value,
    ),
  );
  _eventBus.tryAddCrashReport(
    Loglytics._crashReportsInterface?.setCustomKey(
      property,
      value,
    ),
  );
  _log?.analytic(
    name: '[PROPERTY] $property',
    value: value,
    addToCrashReports: Loglytics._addAnalyticsToCrashReports,
  );
}