dispose method

  1. @override
Future<void> dispose()

Can be called to clean up resources

Implementation

@override
Future<void> dispose() {
  channel.close();
  socket.close();
  return super.dispose();
}