shouldConnect property

bool get shouldConnect

Whether to connect to the real device, based on the last registration.

Uses CamsDeviceRegistration.isConnected if the registration is one. Otherwise true, e.g. if there is no prior registration.

Implementation

bool get shouldConnect =>
    registration is CamsDeviceRegistration ? (registration as CamsDeviceRegistration).isConnected : true;