dispose method
Release any resources held by this node.
Implementation
@override
Future<void> dispose() async {
super.dispose();
// If not getContext and element is disposed that context is not existed.
if (painter.context != null) {
painter.context!.dispose();
}
}