instance property

BinaryMessenger get instance

The existing instance of this class, if any.

Throws if ensureInitialized has not been called at least once.

Implementation

static BinaryMessenger get instance {
  if (_instance == null) {
    throw StateError(
        'The BackgroundIsolateBinaryMessenger.instance value is invalid '
        'until BackgroundIsolateBinaryMessenger.ensureInitialized is '
        'executed.');
  }
  return _instance!;
}