instance property

The default instance of SerialCommunicationPlatform to use.

Defaults to MethodChannelSerialCommunication.

Implementation

static SerialCommunicationPlatform get instance => _instance;
set instance (SerialCommunicationPlatform instance)

Platform-specific implementations should set this with their own platform-specific class that extends SerialCommunicationPlatform when they register themselves.

Implementation

static set instance(SerialCommunicationPlatform instance) {
  PlatformInterface.verifyToken(instance, _token);
  _instance = instance;
}