stop method

  1. @override
Future<void> stop()
override

Implementation

@override
Future<void> stop() async {
  if (kDebugMode) {
    logger?.debug(this,
        'Application is in debug mode, not stopping Firebase Http Metric');
    return;
  }

  if (!kCanTrace) {
    logger?.debug(this, 'Firebase Http Metric is not allowed to trace');
    return;
  }

  if (kInstance == null) {
    logger?.error(this, 'Firebase Http Metric is not initialized');
    return;
  }

  logger?.debug(this, 'Stopping Firebase Http Metric');

  await kInstance?.stop();

  logger?.info(this, 'Stopped Firebase Http Metric');
}