instance property

RootIsolateToken? instance
final

The token for the root isolate that is executing this Dart code. If this Dart code is not executing on a root isolate instance will be null.

Implementation

static final RootIsolateToken? instance = () {
  final int token = __getRootIsolateToken();
  return token == 0 ? null : RootIsolateToken._(token);
}();