dispose method
Implementation
@override
dispose() {
assert(() {
if (_ticker == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary(
'FanjiaoDanmuController.dispose() called more than once.'),
ErrorDescription(
'A given $runtimeType cannot be disposed more than once.\n'),
foundation.DiagnosticsProperty<DanmuController<T>>(
'The following $runtimeType object was disposed multiple times',
this,
style: foundation.DiagnosticsTreeStyle.errorProperty,
),
]);
}
return true;
}());
_ticker!.dispose();
_ticker = null;
_lastElapsedDuration = null;
_status = DanmuStatus.dispose;
clearTickListeners();
clearStatusListeners();
clearListeners();
clearDanmu();
super.dispose();
}