-
-
Notifications
You must be signed in to change notification settings - Fork 940
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
[Question]: Is generated_plugin_registrant.dart necessary for web for device_info_plus and package_info_plus? #1274
Comments
Looks related to #1270 |
Please check if with the latest release of the package(s) still happens |
Hey @miquelbeltran, I think this line is the culprit plus_plugins/packages/device_info_plus/device_info_plus/lib/device_info_plus.dart Line 26 in 37abbf7
If I try to write |
Same for PackageInfo. |
mhh, so adding the export for the web plugin implementation causes the generated_plugin_registrant not to work properly? If you can checkout the project locally, reference by path, and then find what causes it, it will be super helpful (also feel free to submit a PR if you find the solution). |
Just for the record, if I add package_info_plus, device_info_plus and connectivity_plus to a project, run it as web app, I see no problems running it, calling to the plugins, and the |
Is the file web_plugin_registrant the same as generated_plugin_registrant? I tried deleting the generated_plugin_registrant file and it didn't even regenerate itself. |
It is in |
Found it! And it does generate correctly for all packages. |
I remember that the generated_plugin_registrant.dart is generated when running on web, but I guess this was changed eventually. Do you still have problems running the project on web with the latest release? |
Nope, all good. |
Wait, that whole file |
…r web anyway. Problem after package_info_plus and device_info_plus updates: the generated_plugin_registrant.dart which is for web platform does not compile (package:device_info_plus_web/device_info_plus_web.dart and package:package_info_plus_web/package_info_plus_web.dart does not exist any more). See also fluttercommunity/plus_plugins#1274
I have two files |
Deleted file because of fluttercommunity/plus_plugins#1274.
- Updated `i18n_extensions` and fixed gradle files to make it run. Also repaired iOS files (podfile) so the example app could run. - Updated `image_picker` - Updated `string_validator` - Upgraded `device_info_plus`. With this upgrade, also updated the `file_picker` on the example app otherwise dependency versioning wouldn't work. Also deleted the generated `generated_plugin_registrant.dart`, as it's not needed. See fluttercommunity/plus_plugins#1274. - left `pedantic` on, even though `flutter_lint` is the default way now. This is because I don't know the exact rules and if this was desirable for your team.
What is your question?
Hey,
After upgrading
device_info_plus
andpackage_info_plus
to latest versions,the
generated_plugin_registrant.dart
file does not generate thePackageInfoPlugin.registerWith(registrar);
andDeviceInfoPlusPlugin.registerWith(registrar);
lines anymore (It used to generate those lines, so after upgrading I had this errorIs this the right behaviour?
Thanks.
Checklist before submitting a question
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: