Skip to content

Commit

Permalink
Document that all MethodChannel callbacks must be called on the main …
Browse files Browse the repository at this point in the history
…thread. (flutter#6245)

This further addresses flutter/flutter#14568.
  • Loading branch information
nichtverstehen authored and jason-simmons committed Sep 27, 2018
1 parent e6c1733 commit 27f77cb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public interface MethodCallHandler {
* <p>Any uncaught exception thrown by this method will be caught by the channel implementation and
* logged, and an error result will be sent back to Flutter.</p>
*
* <p>The handler is called on the platform thread (Android main thread). For more details see
* <a href="https://github.com/flutter/engine/wiki/Threading-in-the-Flutter-Engine">Threading in the Flutter
* Engine</a>.</p>
*
* @param call A {@link MethodCall}.
* @param result A {@link Result} used for submitting the result of the call.
*/
Expand All @@ -128,6 +132,10 @@ public interface MethodCallHandler {
* to be invoked by Flutter act as clients of this interface for sending results
* back to Flutter. Invokers of Flutter methods provide implementations of this
* interface for handling results received from Flutter.
*
* <p>All methods of this class must be called on the platform thread (Android main thread). For more details see
* <a href="https://github.com/flutter/engine/wiki/Threading-in-the-Flutter-Engine">Threading in the Flutter
* Engine</a>.</p>
*/
public interface Result {
/**
Expand Down

0 comments on commit 27f77cb

Please sign in to comment.