Package io.flutter.util

# Class HandlerCompat

java.lang.Object
io.flutter.util.HandlerCompat

public final class HandlerCompat extends Object
Compatability wrapper over `Handler`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HandlerCompat()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Handler`
  `createAsyncHandler(Looper looper)`
  Create a new Handler whose posted messages and runnables are not subject to synchronization barriers such as display vsync.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HandlerCompat

    public HandlerCompat()

- ## Method Details

  - ### createAsyncHandler

    public static Handler createAsyncHandler(Looper looper)
    Create a new Handler whose posted messages and runnables are not subject to synchronization barriers such as display vsync.

    Messages sent to an async handler are guaranteed to be ordered with respect to one another, but not necessarily with respect to messages from other Handlers. Compatibility behavior:

    - SDK 28 and above, this method matches platform behavior.
    - Otherwise, returns a synchronous handler instance.
    Parameters:
      `looper` - the Looper that the new Handler should be bound to
    Returns:
      a new async Handler instance
    See Also:
      - `Handler.createAsync(Looper)`