dispose method

Future<void> dispose()

Disconnect and permanently close the service.

Call this when the SoilSensorService will not be used again (e.g. in a widget's dispose() callback). After calling dispose the service must not be used; create a new instance if you need to reconnect.

Implementation

Future<void> dispose() async {
  await disconnect();
  await _winRx.close();
}