isCurrentThreadMainThread property

bool get isCurrentThreadMainThread

Check if the current thread is the main thread.

Returns

  • true if the current thread is the main thread
  • false if the current thread is not the main thread

Throws

  • An exception if it fails.

Implementation

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

  return resultString['result'];
}