-
Notifications
You must be signed in to change notification settings - Fork 6k
Add FlEventChannel #21316
Add FlEventChannel #21316
Conversation
Solve by keeping a reference to the FlEngine until a source completes.
I just noticed while testing that EventChannel.receiveBroadcastStream passes arguments - I'll add support for these. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments below. I've never actually used the event channel API, so (especially on top of my usual lack of experience with GObject) I'm not super confident in my review here.
Have you tried finding a live use case and ensuring that you can write a Linux version of that plugin (at least, that part, with other bits stubbed out)?
I'm also a bit unsure about the correct use of the API. I've got an example program that sends a stream of integers, but I haven't found a good real-world example to implement yet. |
This change is going to require the Linux template to be updated due to the new header file. But that means there must be a transition point where Flutter gets the new engine but the template is broken as it will be missing it. @stuartmorgan is there a way around that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this. I bumped into missing event channels on Linux and found this. For what it's worth, this works fine for me with simple string values.
What would the actual breakage be? Wouldn't the effect just be that if someone manually deleted that one specific header (and none of the others), the rule wouldn't re-run? If it actually is broken, then it's a significant problem. Any required template update means breaking everyone's existing project. Doing that post-alpha requires going through the full breaking change process at a minimum, and ideally adding project migration logic to On the other hand if it's just that the output list won't be comprehensive for older projects, then it should be fine to just update the template and not worry about existing projects. |
NOTE! This depends on: - flutter/engine#21316 - flutter/engine#21405 Ref: #4 Ref: #5
NOTE! This depends on: - flutter/engine#21316 - flutter/engine#21405 Ref: #4 Ref: #5
NOTE! This depends on: - flutter/engine#21316 - flutter/engine#21405 Ref: #4 Ref: #5
NOTE! This depends on: - flutter/engine#21316 - flutter/engine#21405 Ref: #4 Ref: #5
I'm not 100% sure but I think the following might happen:
It seems to me that |
Ah, that's not how the copy works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tree is open now. Landing. |
* 000bf4b Roll Skia from 2d2f82c00aeb to 5c7bb326a7b3 (33 revisions) (flutter/engine#22059) * ae92dbf Roll Fuchsia Linux SDK from lPMs_KwnU... to gqS_DIjN4... (flutter/engine#22057) * 92cd74e Roll Fuchsia Mac SDK from pZ9FgVZTK... to WLxBkBnZa... (flutter/engine#22055) * e51c710 Roll Dart SDK from a3d902d8598e to 9f907e198970 (2 revisions) (flutter/engine#22058) * 326b202 Reland fuchsia external view embedder will be shared with platform view (flutter/engine#22008) * a9a9a2f Roll Skia from 5c7bb326a7b3 to 65674e4c2e56 (3 revisions) (flutter/engine#22060) * 1233fe4 Revert "Revert "Explicitly make the X connection for EGL. (#21831)" (#21851)" (flutter/engine#21871) * aed8e01 Fixes Edge trigger route change announcement (flutter/engine#21975) * 6bc70e4 Reland: Migration to PlatformDispatcher and multi-window (flutter/engine#21932) * 5ca5e26 Add FlEventChannel (flutter/engine#21316) * 77b0052 Roll Skia from 65674e4c2e56 to 01b05e5b830b (3 revisions) (flutter/engine#22062) * 3d27fd5 Support loading assets from Android dynamic feature modules (flutter/engine#21504) * 742dfbe support uri intent launcher in android (flutter/engine#21275) * cde1e3f Auto detect mode to determine which rendering backend to use. (flutter/engine#21852) * 329ccf7 Roll Skia from 01b05e5b830b to 53281c712159 (1 revision) (flutter/engine#22065) * cde78c1 Add a golden scenario test for fallback font rendering on iOS take 2 (flutter/engine#22033) * 4f4599b Roll Dart SDK from 9f907e198970 to 37ccceacad41 (3 revisions) (flutter/engine#22069) * f0b10c5 [web] Prevent using DOM nodes for canvas with large number of draws (flutter/engine#22064) * a86ba57 Roll Fuchsia Mac SDK from WLxBkBnZa... to zDfaxkqlv... (flutter/engine#22073) * 645198a Roll Fuchsia Linux SDK from gqS_DIjN4... to vuKxZmSVj... (flutter/engine#22074) * 0b26570 Revert dart rolls (flutter/engine#22078)
@robert-ancell I wonder where the method |
See https://docs.gtk.org/gobject/concepts.html#object-instantiation
That suggests that dispose has been called, not that it hasn't. |
Thank you @stuartmorgan, wasn't aware of the concept. |
Description
Add FlEventChannel
Related Issues
flutter/flutter#65270
Tests
I added the following tests:
Tests added in
shell/platform/linux/fl_event_channel_test.cc
.Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.