Skip to content

Commit

Permalink
add some notes re: setMessageHandler()
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Nov 25, 2024
1 parent 025c235 commit b87006b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/FlutterSwift/Channel/FlutterChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ extension _FlutterBinaryMessengerConnectionRepresentable {
}
}

/// helper function to set the message handler for a channel.
/// `optionalHandler` is the handler function; if `nil`, then the message
/// handler will be removed (as if `removeMessageHandler()` was called`.
/// Otherwise, `block` is called to wrap the handler into a
/// `FlutterBinaryMessageHandler`.
#if canImport(Android)
@UIThreadActor
#else
Expand Down

0 comments on commit b87006b

Please sign in to comment.