trackErrorWithException method

  1. @override
Future trackErrorWithException(
  1. String source,
  2. dynamic e,
  3. dynamic stackTrace
)
override

Track an error with an exception. @param source The source of the error. @param stackTrace The stack trace.

Implementation

@override
Future trackErrorWithException(String source, dynamic e, dynamic stackTrace)
async
{
    logger.logInfo((_isEnabled ? 'GoogleAnalytics' : 'Disabled-GoogleAnalytics') + ': trackErrorWithException: $source / $e / $stackTrace');

    if (_isEnabled)
        await track('Error', {'Message': e.toString(), 'StackTrace': stackTrace?.toString()});
}