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

auto-submit[bot] merged 4 commits into
flutter:masterfrom
ueman:flutter-version-v2

Conversation

@ueman

@ueman ueman 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.5
FlutterVersion.channel;           // stable
FlutterVersion.gitUrl;            // https://github.com/flutter/flutter.git
FlutterVersion.frameworkRevision; // 78666c8dc5
FlutterVersion.engineRevision;    // 3f3e560236
FlutterVersion.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-actions github-actions Bot 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 bkonyi February 21, 2025 09:23
@bkonyi bkonyi added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2025
@bkonyi

bkonyi commented Feb 21, 2025

Copy link
Copy Markdown
Contributor

Thanks for re-uploading!

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

auto-submit Bot commented Feb 21, 2025

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.

@bkonyi
bkonyi requested a review from matanlurey February 21, 2025 14:32
@ueman

ueman commented Feb 21, 2025

Copy link
Copy Markdown
Contributor Author

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

@MitchellGoodwin MitchellGoodwin added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2025
@auto-submit
auto-submit Bot added this pull request to the merge queue Feb 24, 2025
Merged via the queue into flutter:master with commit a8d1b62 Feb 24, 2025
@flutter-dashboard flutter-dashboard Bot 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. team-ios Owned by iOS platform team tool Affects 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