Skip to content

Commit d2da104

Browse files
authored
feat(mobile): add animated community switcher (#8076)
## Summary Replace the community switch sheet with a two-column picker. Selection enlarges the avatar, waits with the voice-note loader for destination channel content and layout to settle, then follows a curved path into the header. Cache raster icons at a maximum 512-pixel size and accept only resource-free emoji SVGs. Cancel timed-out or disposed downloads without delaying content readiness. Animate Edit badges in place, and open Add Community on the pairing welcome page. Community removal lives only in the switcher’s Edit mode. Keep the flow shared across Android/iOS, with native iOS controls and removal confirmation, and clear navigation backgrounds at rest. ### Related issue Related to #8070 (community icon refresh/caching). ### Testing - 122 focused Flutter regression tests and seven native iOS tests passed after merging the latest navigation changes from `main`. Earlier feature build installed and launched on a physical iPhone. - Full mobile pre-push checks passed; regression coverage includes gradient rendering, rejected/oversized icons, bounded persisted raster decoding, SVG resource rejection and cache migration, timeout/disposal cancellation, disconnected destination channels, degraded unread-history settlement, and switching while icons refresh. Full `just ci` stopped during Rust checks for low disk space. Hosted CI remains required. - [Grid and Edit previews](#8076 (comment)). --------- Signed-off-by: kenny lopez <[email protected]>
1 parent 05d1714 commit d2da104

39 files changed

Lines changed: 4129 additions & 767 deletions

‎mobile/ios/Runner.xcodeproj/project.pbxproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
C0AF00000000000000000001 /* NativeConfirmationDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0AF00000000000000000002 /* NativeConfirmationDialog.swift */; };
1011
BZZ00000000000000000001 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BZZ00000000000000000006 /* NotificationService.swift */; };
1112
BZZ00000000000000000002 /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = BZZ00000000000000000009 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
1213
BZZ00000000000000000020 /* BuzzPushKit in Frameworks */ = {isa = PBXBuildFile; productRef = BZZ00000000000000000022 /* BuzzPushKit */; };
@@ -88,6 +89,7 @@
8889
/* End PBXCopyFilesBuildPhase section */
8990

9091
/* Begin PBXFileReference section */
92+
C0AF00000000000000000002 /* NativeConfirmationDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeConfirmationDialog.swift; sourceTree = "<group>"; };
9193
BZZ00000000000000000006 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
9294
BZZ00000000000000000007 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9395
BZZ00000000000000000008 /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = NotificationService.entitlements; sourceTree = "<group>"; };
@@ -277,6 +279,7 @@
277279
4A71C0142F40A00100A17E01 /* NativeMessageActionSurface.swift */,
278280
4A71C0162F40B00100A17E01 /* HuddleMediaPlugin.swift */,
279281
4A71C0182F40C00100A17E01 /* HuddleAudioEngine.swift */,
282+
C0AF00000000000000000002 /* NativeConfirmationDialog.swift */,
280283
4A71C01A2F40D00100A17E01 /* NativeProfileTextEditor.swift */,
281284
4A71C01C2F40E00100A17E01 /* NativeSkinToneControl.swift */,
282285
4A71C01E2F40F00100A17E01 /* ThemePaginationGlassControl.swift */,
@@ -609,6 +612,7 @@
609612
4A71C0132F40A00100A17E01 /* NativeMessageActionSurface.swift in Sources */,
610613
4A71C0152F40B00100A17E01 /* HuddleMediaPlugin.swift in Sources */,
611614
4A71C0172F40C00100A17E01 /* HuddleAudioEngine.swift in Sources */,
615+
C0AF00000000000000000001 /* NativeConfirmationDialog.swift in Sources */,
612616
4A71C0192F40D00100A17E01 /* NativeProfileTextEditor.swift in Sources */,
613617
4A71C01B2F40E00100A17E01 /* NativeSkinToneControl.swift in Sources */,
614618
4A71C01D2F40F00100A17E01 /* ThemePaginationGlassControl.swift in Sources */,

‎mobile/ios/Runner/AppDelegate.swift‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import os.log
4141
private var concentricSheetSurfaceChannel: FlutterMethodChannel?
4242
private var nativeAttachmentPopoverCoordinator: NativeAttachmentPopoverCoordinator?
4343
private var nativeEmojiPickerCoordinator: NativeEmojiPickerCoordinator?
44+
private var nativeConfirmationDialogCoordinator: NativeConfirmationDialogCoordinator?
4445
private var nativeProfileTextEditorCoordinator: NativeProfileTextEditorCoordinator?
4546
private var nativeMessageActionSurfaceSupportChannel: FlutterMethodChannel?
4647
private var huddleMediaPlugin: HuddleMediaPlugin?
@@ -243,6 +244,13 @@ import os.log
243244
parentViewController: nativeEmojiPickerRegistrar?.viewController
244245
)
245246

247+
nativeConfirmationDialogCoordinator = NativeConfirmationDialogCoordinator(
248+
messenger: messenger,
249+
parentViewController: engineBridge.pluginRegistry.registrar(
250+
forPlugin: "BuzzNativeConfirmationDialog"
251+
)?.viewController
252+
)
253+
246254
let nativeProfileTextEditorRegistrar = engineBridge.pluginRegistry.registrar(
247255
forPlugin: "BuzzNativeProfileTextEditor"
248256
)

‎mobile/ios/Runner/IosNavigationBar.swift‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
208208
private var measuredCategory: UIContentSizeCategory?
209209
private var measuring = false
210210
private var metrics: [String: Any]?
211+
private weak var trackedAvatar: UIButton?
212+
private var reportedAvatarFrame: CGRect?
211213

212214
init(frame: CGRect, id: Int64, args: Any?, messenger: FlutterBinaryMessenger, parent: UIViewController?) {
213215
container = NavigationClipView(frame: frame)
@@ -234,6 +236,11 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
234236
channel.setMethodCallHandler { [weak self] call, result in
235237
switch call.method {
236238
case "configure": self?.configure(call.arguments as? [String: Any] ?? [:])
239+
case "prepareForReveal":
240+
UIView.performWithoutAnimation {
241+
self?.container.setNeedsLayout()
242+
self?.container.layoutIfNeeded()
243+
}
237244
case "scroll":
238245
self?.setScrollOffset((call.arguments as? NSNumber)?.doubleValue ?? 0)
239246
default: result(FlutterMethodNotImplemented); return
@@ -259,6 +266,22 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
259266
navigation.view.layoutIfNeeded()
260267
measureIfNeeded()
261268
applyScroll()
269+
reportAvatarBounds()
270+
}
271+
272+
private func reportAvatarBounds() {
273+
guard let avatar = trackedAvatar, avatar.window != nil, avatar.bounds.width > 0 else { return }
274+
avatar.layoutIfNeeded()
275+
guard let image = avatar.imageView, image.bounds.width > 0 else { return }
276+
let frame = image.convert(image.bounds, to: container)
277+
guard frame != reportedAvatarFrame else { return }
278+
reportedAvatarFrame = frame
279+
DispatchQueue.main.async { [weak self] in
280+
self?.channel.invokeMethod("avatarBounds", arguments: [
281+
"id": "leading", "x": frame.minX, "y": frame.minY,
282+
"width": frame.width, "height": frame.height
283+
])
284+
}
262285
}
263286

264287
private func configure(_ args: [String: Any]) {
@@ -326,6 +349,8 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
326349
item.titleView = nil
327350
}
328351
item.largeTitleDisplayMode = bar.prefersLargeTitles ? .always : .never
352+
trackedAvatar = nil
353+
reportedAvatarFrame = nil
329354
if let leading = args["leading"] as? [String: Any] {
330355
item.leftBarButtonItems = [makeItem(leading)]
331356
} else if args["back"] as? Bool == true {
@@ -378,6 +403,7 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
378403
offset = max(0, value)
379404
material.alpha = min(1, offset / 12)
380405
applyScroll()
406+
reportAvatarBounds()
381407
}
382408

383409
private func applyScroll() {
@@ -463,6 +489,27 @@ private final class IosNavigationBarView: NSObject, FlutterPlatformView {
463489
}.withRenderingMode(.alwaysOriginal)
464490
item.accessibilityValue = data["activityLabel"] as? String
465491
}
492+
if data["tracksAvatarBounds"] as? Bool == true, data["id"] as? String == "leading",
493+
data["avatarInitial"] is String {
494+
// An explicit native button gives Flutter a public, measured destination
495+
// without depending on UINavigationBar's private view hierarchy.
496+
let button = UIButton(type: .custom)
497+
// UIKit adds the glass button's own padding around this custom view.
498+
// Match the 36-point image on both axes so that glass stays circular.
499+
button.frame = CGRect(x: 0, y: 0, width: 36, height: 36)
500+
button.widthAnchor.constraint(equalToConstant: 36).isActive = true
501+
button.heightAnchor.constraint(equalToConstant: 36).isActive = true
502+
button.setImage(item.image?.withAlignmentRectInsets(.zero), for: .normal)
503+
button.addAction(action, for: .touchUpInside)
504+
button.isEnabled = item.isEnabled
505+
button.accessibilityLabel = item.accessibilityLabel
506+
button.accessibilityIdentifier = "community-navigation-avatar"
507+
let hidden = data["avatarHidden"] as? Bool == true
508+
button.alpha = hidden ? 0 : 1
509+
button.accessibilityElementsHidden = hidden
510+
trackedAvatar = button
511+
return UIBarButtonItem(customView: button)
512+
}
466513
return item
467514
}
468515

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import Flutter
2+
import UIKit
3+
4+
/// Owns a destructive UIKit alert until dismissal and replies exactly once.
5+
final class NativeConfirmationDialogCoordinator: NSObject {
6+
private let channel: FlutterMethodChannel
7+
private weak var parent: UIViewController?
8+
private weak var alert: UIAlertController?
9+
private var pendingResult: FlutterResult?
10+
private var isFinishing = false
11+
12+
init(messenger: FlutterBinaryMessenger, parentViewController: UIViewController?) {
13+
channel = FlutterMethodChannel(name: "buzz/confirmation_dialog", binaryMessenger: messenger)
14+
parent = parentViewController
15+
super.init()
16+
channel.setMethodCallHandler { [weak self] call, result in
17+
guard let self else { result(false); return }
18+
self.handle(call, result: result)
19+
}
20+
}
21+
22+
private func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
23+
guard call.method == "present" else { result(FlutterMethodNotImplemented); return }
24+
guard let data = call.arguments as? [String: Any],
25+
let title = data["title"] as? String,
26+
let message = data["message"] as? String,
27+
let confirmLabel = data["confirmLabel"] as? String,
28+
let cancelLabel = data["cancelLabel"] as? String else {
29+
result(FlutterError(code: "invalid_arguments", message: "Expected confirmation labels.", details: nil))
30+
return
31+
}
32+
// Repeated taps must not create stacked alerts or multiple removals.
33+
guard pendingResult == nil else { result(false); return }
34+
var presenter = parent ?? UIApplication.shared.connectedScenes
35+
.compactMap { $0 as? UIWindowScene }
36+
.filter { $0.activationState == .foregroundActive }
37+
.flatMap(\.windows).first(where: \.isKeyWindow)?.rootViewController
38+
while let presented = presenter?.presentedViewController { presenter = presented }
39+
guard let presenter, presenter.view.window != nil,
40+
!presenter.isBeingDismissed, !(presenter is UIAlertController) else {
41+
result(FlutterError(code: "presentation_failed", message: "Cannot present confirmation right now.", details: nil))
42+
return
43+
}
44+
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
45+
alert.overrideUserInterfaceStyle = data["dark"] as? Bool == true ? .dark : .light
46+
alert.addAction(UIAlertAction(title: cancelLabel, style: .cancel) { [weak self] _ in
47+
self?.cancel()
48+
})
49+
alert.addAction(UIAlertAction(title: confirmLabel, style: .destructive) { [weak self] _ in
50+
self?.finish(true)
51+
})
52+
pendingResult = result
53+
self.alert = alert
54+
presenter.present(alert, animated: !UIAccessibility.isReduceMotionEnabled)
55+
}
56+
57+
/// Dismisses an outstanding confirmation without authorizing the action.
58+
func cancel() { finish(false) }
59+
60+
private func finish(_ confirmed: Bool) {
61+
guard pendingResult != nil, !isFinishing else { return }
62+
isFinishing = true
63+
guard let alert else { resolve(confirmed); return }
64+
// Finish native dismissal before Flutter removes the underlying route.
65+
alert.dismiss(animated: !UIAccessibility.isReduceMotionEnabled) { [weak self] in
66+
self?.resolve(confirmed)
67+
}
68+
}
69+
70+
private func resolve(_ confirmed: Bool) {
71+
let result = pendingResult
72+
pendingResult = nil
73+
isFinishing = false
74+
alert = nil
75+
result?(confirmed)
76+
}
77+
}

‎mobile/ios/RunnerTests/RunnerTests.swift‎

Lines changed: 116 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,106 @@ import XCTest
88

99
class RunnerTests: XCTestCase {
1010

11+
@MainActor
12+
func testNativeRemovalConfirmationUsesDestructiveAlertAndCancelsOnce() async throws {
13+
let messenger = NavigationTestMessenger()
14+
let parent = UIViewController()
15+
let window = UIWindow(frame: UIScreen.main.bounds)
16+
window.windowScene = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.first
17+
window.rootViewController = parent
18+
parent.view.backgroundColor = .systemBackground
19+
window.makeKeyAndVisible()
20+
defer { window.isHidden = true }
21+
let coordinator = NativeConfirmationDialogCoordinator(messenger: messenger, parentViewController: parent)
22+
let arguments: [String: Any] = ["title": "Remove community?",
23+
"message": "Are you sure you want to remove “Alpha”? You can pair with it again later.",
24+
"confirmLabel": "Remove", "cancelLabel": "Cancel", "dark": false]
25+
var replies: [Bool] = []
26+
let completed = expectation(description: "Native confirmation dismissed")
27+
messenger.invoke("present", arguments: arguments) {
28+
if let value = $0 as? Bool { replies.append(value); completed.fulfill() }
29+
}
30+
let alert = try XCTUnwrap(parent.presentedViewController as? UIAlertController)
31+
if let transition = alert.transitionCoordinator {
32+
await withCheckedContinuation { continuation in
33+
transition.animate(alongsideTransition: nil) { _ in continuation.resume() }
34+
}
35+
}
36+
XCTAssertEqual(alert.preferredStyle, .alert)
37+
XCTAssertEqual(alert.title, "Remove community?")
38+
XCTAssertEqual(alert.message, arguments["message"] as? String)
39+
XCTAssertEqual(alert.actions.map(\.title), ["Cancel", "Remove"])
40+
XCTAssertEqual(alert.actions.map(\.style), [.cancel, .destructive])
41+
XCTAssertEqual(alert.overrideUserInterfaceStyle, .light)
42+
XCTAssertTrue(replies.isEmpty)
43+
var duplicate: Bool?
44+
messenger.invoke("present", arguments: arguments) { duplicate = $0 as? Bool }
45+
XCTAssertEqual(duplicate, false)
46+
XCTAssertTrue(parent.presentedViewController === alert)
47+
let capture = UIGraphicsImageRenderer(bounds: window.bounds).image { _ in
48+
window.drawHierarchy(in: window.bounds, afterScreenUpdates: true)
49+
}
50+
let attachment = XCTAttachment(image: capture)
51+
attachment.name = "Native remove community alert"
52+
attachment.lifetime = .keepAlways
53+
add(attachment)
54+
coordinator.cancel()
55+
coordinator.cancel()
56+
await fulfillment(of: [completed], timeout: 3)
57+
XCTAssertNil(parent.presentedViewController)
58+
XCTAssertEqual(replies, [false])
59+
}
60+
61+
@MainActor
62+
func testCommunityAvatarReportsItsVisibleFrameAndHidesWithoutMoving() async throws {
63+
let messenger = NavigationTestMessenger()
64+
let parent = UIViewController()
65+
let window = UIWindow(frame: CGRect(x: 0, y: 0, width: 393, height: 852))
66+
window.windowScene = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.first
67+
parent.view.backgroundColor = .systemBackground
68+
window.rootViewController = parent
69+
window.makeKeyAndVisible()
70+
defer { window.isHidden = true }
71+
let factory = IosNavigationBarFactory(messenger: messenger, parent: parent)
72+
var leading: [String: Any] = ["id": "leading", "label": "Community settings",
73+
"avatarInitial": "A", "enabled": true, "tracksAvatarBounds": true]
74+
let bar = factory.create(withFrame: CGRect(x: 0, y: 0, width: 393, height: 160),
75+
viewIdentifier: 999991, arguments: ["title": "Alpha", "largeTitle": true, "leading": leading,
76+
"actions": [["id": "profile", "label": "Profile", "avatarInitial": "P", "enabled": true]]])
77+
parent.view.addSubview(bar.view())
78+
parent.view.layoutIfNeeded()
79+
try await Task.sleep(nanoseconds: 200_000_000)
80+
let navigation = try XCTUnwrap(parent.children.first as? UINavigationController)
81+
func avatar() throws -> UIButton {
82+
try XCTUnwrap(navigation.topViewController?.navigationItem.leftBarButtonItems?.first?.customView as? UIButton)
83+
}
84+
// A rectangular custom view makes UIKit's surrounding glass a pill.
85+
let buttonBounds = try avatar().bounds
86+
XCTAssertEqual(buttonBounds.width, buttonBounds.height)
87+
XCTAssertEqual(buttonBounds.width, 36)
88+
let visibleFrame = try XCTUnwrap(messenger.avatarBounds)
89+
XCTAssertEqual((visibleFrame["width"] as? NSNumber)?.doubleValue, 36)
90+
XCTAssertEqual((visibleFrame["height"] as? NSNumber)?.doubleValue, 36)
91+
let image = try XCTUnwrap(avatar().imageView)
92+
let imageFrame = image.convert(image.bounds, to: bar.view())
93+
XCTAssertEqual((visibleFrame["x"] as? NSNumber)?.doubleValue, imageFrame.minX)
94+
XCTAssertEqual((visibleFrame["y"] as? NSNumber)?.doubleValue, imageFrame.minY)
95+
try avatar().sendActions(for: .touchUpInside)
96+
XCTAssertEqual(messenger.actions, ["leading"])
97+
leading["avatarHidden"] = true
98+
messenger.configure(["title": "Bravo", "largeTitle": true, "leading": leading])
99+
var landingPrepared = false
100+
messenger.invoke("prepareForReveal", arguments: [:]) { _ in landingPrepared = true }
101+
XCTAssertTrue(landingPrepared)
102+
XCTAssertFalse(bar.view().layer.needsLayout())
103+
XCTAssertEqual(try avatar().alpha, 0)
104+
XCTAssertEqual((messenger.avatarBounds?["x"] as? NSNumber)?.doubleValue, imageFrame.minX)
105+
XCTAssertEqual((messenger.avatarBounds?["y"] as? NSNumber)?.doubleValue, imageFrame.minY)
106+
leading["avatarHidden"] = false
107+
messenger.configure(["title": "Bravo", "largeTitle": true, "leading": leading])
108+
XCTAssertEqual(try avatar().alpha, 1)
109+
}
110+
11111
@MainActor
12112
func testConversationTitleHasWidthBeforePlatformViewLayout() throws {
13113
let parent = UIViewController()
@@ -244,7 +344,7 @@ class RunnerTests: XCTestCase {
244344
}
245345

246346
@MainActor
247-
func testCompactMaterialOnlyAppearsAfterScrolling() async throws {
347+
func testCompactNavigationMaterialFollowsScrollDepth() async throws {
248348
let messenger = NavigationTestMessenger()
249349
let parent = UIViewController()
250350
let window = UIWindow(frame: UIScreen.main.bounds)
@@ -260,8 +360,9 @@ class RunnerTests: XCTestCase {
260360
parent.view.addSubview(bar.view())
261361
parent.view.layoutIfNeeded()
262362
let material = try XCTUnwrap(bar.view().subviews.first as? UIVisualEffectView)
263-
// At rest and during top-edge overscroll the bar is clear; positive
264-
// scroll gradually introduces the backdrop.
363+
XCTAssertEqual(material.alpha, 0, "Compact titles must not frost an unscrolled page")
364+
// Scrolling, returning to rest, and pull-to-refresh all share the same
365+
// treatment as large titles; reconfiguration must preserve that depth.
265366
for offset in [0.0, 6.0, 52.0, 12.0, 0.0, -20.0, 0.0] {
266367
messenger.scroll(to: offset)
267368
bar.view().setNeedsLayout()
@@ -273,7 +374,10 @@ class RunnerTests: XCTestCase {
273374
XCTAssertEqual(locations.first?.doubleValue, 0)
274375
XCTAssertEqual(locations.last?.doubleValue, 1)
275376
XCTAssertLessThan(locations[1].doubleValue, 1, "Compact material needs a soft lower edge")
276-
XCTAssertEqual(material.alpha, min(1, max(0, offset) / 12), accuracy: 0.01)
377+
XCTAssertEqual(material.alpha, min(1, max(0, offset) / 12), accuracy: 0.001)
378+
messenger.configure(["title": "general", "subtitle": "37 members"])
379+
XCTAssertEqual(material.alpha, min(1, max(0, offset) / 12), accuracy: 0.001,
380+
"Updating a compact title must not restore blur at rest")
277381
XCTAssertEqual(material.frame, bar.view().bounds)
278382
if #available(iOS 26.0, *) {
279383
let navigation = try XCTUnwrap(parent.children.first as? UINavigationController)
@@ -1637,11 +1741,13 @@ private actor NativeEmojiDownloadProbe {
16371741

16381742
private final class NavigationTestMessenger: NSObject, FlutterBinaryMessenger {
16391743
var metrics: [String: Any]?
1744+
var avatarBounds: [String: Any]?
16401745
var actions: [String] = []
16411746
func send(onChannel channel: String, message: Data?) {
16421747
guard let message else { return }
16431748
let call = FlutterStandardMethodCodec.sharedInstance().decodeMethodCall(message)
16441749
if call.method == "metrics" { metrics = call.arguments as? [String: Any] }
1750+
if call.method == "avatarBounds" { avatarBounds = call.arguments as? [String: Any] }
16451751
if call.method == "action", let action = call.arguments as? String { actions.append(action) }
16461752
}
16471753
func send(onChannel channel: String, message: Data?, binaryReply callback: FlutterBinaryReply?) {
@@ -1662,6 +1768,12 @@ private final class NavigationTestMessenger: NSObject, FlutterBinaryMessenger {
16621768
handler = nil
16631769
}
16641770

1771+
func invoke(_ method: String, arguments: [String: Any], reply: @escaping (Any?) -> Void) {
1772+
let codec = FlutterStandardMethodCodec.sharedInstance()
1773+
let message = codec.encode(FlutterMethodCall(methodName: method, arguments: arguments))
1774+
handler?(message) { data in reply(data.flatMap { codec.decodeEnvelope($0) }) }
1775+
}
1776+
16651777
func configure(_ arguments: [String: Any]) {
16661778
let message = FlutterStandardMethodCodec.sharedInstance().encode(
16671779
FlutterMethodCall(methodName: "configure", arguments: arguments)

0 commit comments

Comments
 (0)