You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most important feature is the version and the build number of the app. Maybe the version and build number could be inserted at compile time and then be read by the plugin? All the other features don't matter for me, but should be supported in some way for completeness.
Reacted by Talent Apps, Travis Dixon, Nils Reichardt, Jonas Sander, Ben Hagen, Hillel Coren, Jorge Sagasti, Yuvarajaa, Ahmed El-Araby, Jan Lübeck and 6 more
@hterkelsen I would like to ask you that within this plugin the macos implementation didn't add the package_info into another directory of it so do i leave it or follow the instruction from your medium article
So... package_info_plus doesn't work really well for web - at least for me it wasn't finding version.json.
I think that the best approach is generating static info at build time from pubspec.yaml and there's already a package for that! https://pub.dev/packages/build_pubspec
The package generates pubspec.yaml dart code at build time, so we're able to retrieve those infos and use them without all of those asyncawait calls.
Of course, these infos have to be manipulated properly (eg: split version by + to get build and version name) and they also don't reflect the real platform files (eg: if you change something directly on platform files that are not generated from pubspec.yaml), but despite these problems I think that its a good alternative.
Note: the only prop I don't see being generated here is the appName, but at least for me, it's not needed - and also probably can be added in pubspec + generated
Short question: What is the difference between package_info and package_info_plus? Why did not implemented this feature for package_info?
"Important: As of January 2021, the Flutter team is no longer accepting non-critical PRs for the original set of plugins in flutter/plugins, and instead they should be submitted in this project. You can read more about this announcement here. as well as in the Flutter 2 announcement blog post." - https://pub.dev/packages/package_info_plus
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
harryterkelsen commentedon Dec 9, 2019
What would you like the web implementation of
package_infoto do? I can't really think of natural web implementations of these: https://pub.dev/documentation/package_info/latest/package_info/PackageInfo-class.htmlprovokateurin commentedon Dec 9, 2019
The most important feature is the version and the build number of the app. Maybe the version and build number could be inserted at compile time and then be read by the plugin? All the other features don't matter for me, but should be supported in some way for completeness.
jj10133 commentedon Apr 27, 2020
Hi, I would like to ask if anyone could give me some idea on how to integrate the web part?? Like i don't no where to begin from.
topilski commentedon May 3, 2020
Any updates?
deakjahn commentedon May 15, 2020
@hterkelsen This one is easy to answer:
appName - the name of the application that's placed into the
Index.htmlTITLEtag. Maybe the description, that can be discussed, because:packageName - might be the name entry from the
pubspec.yamlinstead.version -
pubspec.yamlversion before the plusbuildNumber -
pubspec.yamlversion after the plusjj10133 commentedon May 16, 2020
@hterkelsen I would like to ask you that within this plugin the macos implementation didn't add the package_info into another directory of it so do i leave it or follow the instruction from your medium article
20 remaining items
topilski commentedon Oct 13, 2020
Yes works, thank you!
balvinderz commentedon Oct 13, 2020
@ditman I think this can be closed now.
ditman commentedon Oct 13, 2020
It can! Thanks @balvinderz!
Take a look at package_info_plus, it supports web!
Closing this as done!
Grohden commentedon Oct 23, 2020
So...
package_info_plusdoesn't work really well for web - at least for me it wasn't findingversion.json.I think that the best approach is generating static info at build time from
pubspec.yamland there's already a package for that! https://pub.dev/packages/build_pubspecThe package generates
pubspec.yamldart code at build time, so we're able to retrieve those infos and use them without all of thoseasyncawaitcalls.Of course, these infos have to be manipulated properly (eg: split version by + to get build and version name) and they also don't reflect the real platform files (eg: if you change something directly on platform files that are not generated from
pubspec.yaml), but despite these problems I think that its a good alternative.Note: the only prop I don't see being generated here is the
appName, but at least for me, it's not needed - and also probably can be added in pubspec + generatedbalvinderz commentedon Oct 23, 2020
@Grohden are you on latest master or dev branch?
Grohden commentedon Oct 23, 2020
@balvinderz flutter?
Probably beta branch (?)
balvinderz commentedon Oct 23, 2020
@Grohden this doesnt work in beta channel . You need to be on dev or master channel
nilsreichardt commentedon Dec 9, 2020
Short question: What is the difference between
package_infoandpackage_info_plus? Why did not implemented this feature forpackage_info?balvinderz commentedon Dec 10, 2020
This now works in beta and stable branch too .
guidezpl commentedon May 25, 2021
@nilsreichardt See #83277 for more context
marceloiavenissi commentedon Jun 29, 2021
"Important: As of January 2021, the Flutter team is no longer accepting non-critical PRs for the original set of plugins in flutter/plugins, and instead they should be submitted in this project. You can read more about this announcement here. as well as in the Flutter 2 announcement blog post." - https://pub.dev/packages/package_info_plus
github-actions commentedon Jul 30, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.