Package io.flutter.util
Class HandlerCompat
java.lang.Object
io.flutter.util.HandlerCompat
Compatability wrapper over
Handler
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Handler
createAsyncHandler
(Looper looper) Create a new Handler whose posted messages and runnables are not subject to synchronization barriers such as display vsync.
-
Constructor Details
-
HandlerCompat
public HandlerCompat()
-
-
Method Details
-
createAsyncHandler
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:
-