dispose method

  1. @override
void dispose()
override

This function must be called to free resources, it will also dispose the controller.

Implementation

@override
void dispose() async {
  if (_timer != null) _timer!.cancel();
  if (recorderState != RecorderState.stopped) await stop();
  _currentScrolledDuration.dispose();
  super.dispose();
}