Skip to content

Reland "Make Flutter version information accessible at runtime (#140783)" - #163761

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ueman:flutter-version-v2
Feb 24, 2025
Merged

Reland "Make Flutter version information accessible at runtime (#140783)"#163761
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ueman:flutter-version-v2

Conversation

@ueman

@uemanueman commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

Reverts #163753
Relands #140783

Original PR description below


This makes various Flutter version information available at runtime. It's basically the same as executing flutter --version. This is especially useful for tools like Crashlytics or Sentry (see for example getsentry/sentry-dart#416).

Usage example:

FlutterVersion.version; // 3.16.5FlutterVersion.channel; // stableFlutterVersion.gitUrl; // https://github.com/flutter/flutter.gitFlutterVersion.frameworkRevision; // 78666c8dc5FlutterVersion.engineRevision; // 3f3e560236FlutterVersion.dartVersion; // 3.2.3

This approach has prior art as seen in #134179.

Fixes#61814

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actionsgithub-actionsBot added tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. team-ios Owned by iOS platform team labels Feb 20, 2025
@mraleph
mraleph requested a review from bkonyiFebruary 21, 2025 09:23
@bkonyibkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2025
@bkonyi

Copy link
Copy Markdown
Contributor

Thanks for re-uploading!

@auto-submitauto-submitBot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2025
@auto-submit

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/163761, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@ueman

Copy link
Copy Markdown
ContributorAuthor

@bkonyi or @matanlurey I guess the auto submit label needs to be added again

@MitchellGoodwinMitchellGoodwin added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2025
@auto-submit
auto-submitBot added this pull request to the merge queueFeb 24, 2025
Merged via the queue into flutter:master with commit a8d1b62Feb 24, 2025
@flutter-dashboardflutter-dashboardBot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2025
@ueman
ueman deleted the flutter-version-v2 branch February 25, 2025 14:11
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
@runchen0518

Copy link
Copy Markdown

good support for Flutter plugin providers.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frameworkflutter/packages/flutter repository. See also f: labels.team-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[proposal] allow to detect programmatically what flutter version the app was compiled under

5 participants

@ueman@bkonyi@runchen0518@matanlurey@MitchellGoodwin