isMainThread static method

  1. @Deprecated('Use mainThread getter instead')
bool isMainThread()

Check if the current thread is the main thread.

Returns

  • True if the current thread is the main thread, false otherwise.

Implementation

@Deprecated('Use mainThread getter instead')
static bool isMainThread() {
  final OperationResult resultString = staticMethod('Debug', 'isMainThread');
  return resultString['result'];
}