Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
embedding
engine
dart
PlatformTaskQueue.java
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
package
io.flutter.embedding.engine.dart;
6
7
import
android
.os.Handler;
8
import
android
.os.Looper;
9
import
androidx.annotation.NonNull;
10
import
io.flutter.util.HandlerCompat;
11
12
/** A BinaryMessenger.TaskQueue that posts to the platform thread (aka main thread). */
13
public
class
PlatformTaskQueue
implements
DartMessenger
.
DartMessengerTaskQueue
{
14
// Use an async handler because the default is subject to vsync synchronization and can result
15
// in delays when dispatching tasks.
16
@NonNull
private
final
Handler handler =
HandlerCompat
.
createAsyncHandler
(Looper.getMainLooper());
17
18
@Override
19
public
void
dispatch
(@NonNull Runnable runnable) {
20
handler.post(runnable);
21
}
22
}
io.flutter.embedding.engine.dart.DartMessenger
Definition:
DartMessenger.java:32
io.flutter.embedding.engine.dart.PlatformTaskQueue
Definition:
PlatformTaskQueue.java:13
io.flutter.embedding.engine.dart.PlatformTaskQueue.dispatch
void dispatch(@NonNull Runnable runnable)
Definition:
PlatformTaskQueue.java:19
io.flutter.util.HandlerCompat
Definition:
HandlerCompat.java:14
io.flutter.util.HandlerCompat.createAsyncHandler
static Handler createAsyncHandler(Looper looper)
Definition:
HandlerCompat.java:31
io.flutter.embedding.engine.dart.DartMessenger.DartMessengerTaskQueue
Definition:
DartMessenger.java:77
android
Definition:
BitmapRegionDecoder.cpp:14
Generated on Sun Jun 23 2024 21:55:09 for Flutter Engine by
1.9.4