dispose method

  1. @override
void dispose()
override

Release resources

Implementation

@override
void dispose() async {
  _isNeedDisposed = true;
  if(!_isDisposed){
    _isDisposed = true;
    await _ensureInitialized();
    await _vlcApi.dispose(_textureId);
    _eventSubscription?.cancel();
    _stateStreamController.close();
    _eventStreamController.close();
  }
  super.dispose();
}