-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flutter_local_notifications_linux] Fix build failing on Web #1249
Conversation
Web doesn't support FFI, so we need to strip all transitive dependencies at compile time, that using FFI
f4127b5
to
adc7828
Compare
@MaikuB |
Thank. To carry on the convo from the issue thread, I probably wasn't clear enough that I also did a conditional import. The difference though is that the stub had empty implementations for all methods. I won't be able to test this PR until later but I would thought that would be needed as difference between this plugin and the connectivity one is that this plugin has platform-specific methods and the overrides take extra platform-specific parameters. Therefore, I would've thought an app is compiling for the web but makes calls directly to the Linux plugin (e.g. https://pub.dev/documentation/flutter_local_notifications_linux/latest/flutter_local_notifications_linux/LinuxFlutterLocalNotificationsPlugin/initialize.html or https://pub.dev/documentation/flutter_local_notifications_linux/latest/flutter_local_notifications_linux/LinuxFlutterLocalNotificationsPlugin/getSystemIdMap.html), it would fail to compile as these won't exist in the stub. Another thing is I think it'd still be good to re-implement the posix calls as the |
Yes, you are right, thanks for the comment. I forgot that the main plugin implementation calls these methods in code. I moved these methods into a separate interface that extends |
Yes, I'll push it today. |
b27816c
to
641ab79
Compare
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.
Left some comments on the PR. Let me know what you think
Web doesn't support FFI, so we need to strip all transitive dependencies at compile time, that using FFI
Fixed #1247