dispose method

  1. @override
void dispose()
override

Called when its corresponding element disposed

Implementation

@override
void dispose() {
  super.dispose();

  // Do not forget to clear reference variables, or it will cause memory leaks!
  _lineBoxMetrics.clear();
}