isConnected property
bool
isConnected
Returns a value for whether the controller is connected.
This can be used to identify which controllers are connected to a system. But a controller may be disconnected at any point, so a true value does not guarantee that a following call will succeed. Instead, guard calls to other functions to check that a DeviceNotConnectedError is not thrown.
Implementation
bool get isConnected => state.isConnected;