reportFullyDisplayed static method

Future<void> reportFullyDisplayed()

Reports the time it took for the screen to be fully displayed. This requires the SentryFlutterOptions.enableTimeToFullDisplayTracing option to be set to true.

Implementation

static Future<void> reportFullyDisplayed() async {
  // ignore: invalid_use_of_internal_member
  final options = Sentry.currentHub.options;
  if (options is SentryFlutterOptions) {
    try {
      return options.timeToDisplayTracker.reportFullyDisplayed();
    } catch (exception, stackTrace) {
      options.logger(
        SentryLevel.error,
        'Error while reporting TTFD',
        exception: exception,
        stackTrace: stackTrace,
      );
    }
  } else {
    return;
  }
}