Skip to content

Commit 2688e8e

Browse files
GianlucaCesarisfshaza2
authored andcommitted
Update platform-channels.md (#2939)
* Update platform-channels.md Updated platform-channels.md to reflect changes to the new implementation of binaryMessenger. * Update AUTHORS
1 parent 37e1786 commit 2688e8e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Faisal Abid <faisal.abid@gmail.com>
88
Iiro Krankka <iiro.krankka@gmail.com>
99
Ryuji Iwata <qt.luigi@gmail.com>
1010
Novoda Ltd. — www.novoda.com (Niamh Power, Sebastiano Poggi)
11+
Gianluca Cesari <giangi.ces@gmail.com>

src/docs/development/platform-integration/platform-channels.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,9 @@ a `FlutterMethodChannel` tied to the channel name
579579
580580
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
581581
let batteryChannel = FlutterMethodChannel(name: "samples.flutter.dev/battery",
582-
binaryMessenger: controller)
582+
binaryMessenger: controller.bynaryMessenger)
583583
batteryChannel.setMethodCallHandler({
584-
(call: FlutterMethodCall, result: FlutterResult) -> Void in
584+
(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
585585
// Note: this method is invoked on the UI thread.
586586
// Handle battery messages.
587587
})
@@ -724,4 +724,4 @@ DispatchQueue.main.async {
724724

725725
[block]: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
726726

727-
[dispatch queue]: https://developer.apple.com/documentation/dispatch/dispatchqueue
727+
[dispatch queue]: https://developer.apple.com/documentation/dispatch/dispatchqueue

0 commit comments

Comments
 (0)