cleanupOnRouteChange method

Future<void> cleanupOnRouteChange(
  1. Route? lastRoute
)

Implementation

Future<void> cleanupOnRouteChange(Route<dynamic>? lastRoute) async {
  // stop media on route change
  unawaited(ref.read(audioPlayer).stop());
  unawaited(ref.read(recorderProvider.notifier).stop());
}