Skip to content

Consolidate Flutter/Dart version numbers into shared constants#507

Open
bdero wants to merge 5 commits intomainfrom
bdero/shared-versions
Open

Consolidate Flutter/Dart version numbers into shared constants#507
bdero wants to merge 5 commits intomainfrom
bdero/shared-versions

Conversation

@bdero
Copy link
Contributor

@bdero bdero commented Mar 5, 2026

Summary

  • Added src/consts.ts as a single source of truth for Flutter and Dart version numbers
  • Added a remark plugin (src/plugins/replace-versions.ts) that replaces %flutter_version% and %dart_version% placeholders in MDX files at build time, including inside fenced code blocks
  • Replaced all hardcoded version numbers (~25 occurrences across 6 MDX files) with placeholders

Future version bumps now only require editing src/consts.ts:

export const versions = {
  flutter: '3.41.4',  // change this
  dart: '3.11.1',     // and this
};

Test plan

  • Verified astro build succeeds
  • Verified version numbers appear correctly in built HTML output
  • Verified no unreplaced placeholders leak into built output

bdero added 2 commits March 4, 2026 21:53
Add a remark plugin that replaces %flutter_version% and %dart_version%
placeholders in MDX files at build time. Version numbers are now defined
once in src/consts.ts instead of being hardcoded across 6 files.
@bdero bdero requested a review from eseidel March 5, 2026 05:55
Copy link
Contributor

@eseidel eseidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we live in the future.

**Dart 3.11.1**. Key requirements now include Java 17 minimum for Android, iOS
13+ minimum, and Android 16KB page size support for Google Play compliance.
Impeller is fully default across iOS and Android API 29+.
**Flutter %flutter_version%** (March 2026) is the current stable release,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure you want to replace this one?

Copy link
Contributor Author

@bdero bdero Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's talking about the latest release, so I think we do. TUrns out there's another place where we were reference the latest release month as well, so went ahead and added that as a var too.


```
[✓] Flutter (Channel stable, 3.41.4, on macOS 26.2 25C56 darwin-arm64, locale
[✓] Flutter (Channel stable, %flutter_version%, on macOS 26.2 25C56 darwin-arm64, locale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if you want to replace this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, removed.

bdero and others added 3 commits March 4, 2026 22:20
Also replaces the stale partial versions (3.41, 3.11) in
how-to-install-flutter.mdx with the shared placeholders.
Example outputs contain commit hashes and dates that aren't updated, so
the version numbers in those blocks should stay hardcoded too.
@bdero bdero enabled auto-merge (squash) March 9, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants