isCurrentThreadMainThread property

bool get isCurrentThreadMainThread

Returns whether the current Dart thread is the main/UI thread.

Returns

  • bool: true when running on the main thread.

Implementation

static bool get isCurrentThreadMainThread {
  final OperationResult resultString = staticMethod(
    'SdkSettings',
    'isCurrentThreadMainThread',
  );

  return resultString['result'];
}