Skip to content

Improve README example code accuracy and completeness#538

Merged
larryaasen merged 3 commits intomainfrom
copilot/improve-readme-code-examples
Feb 22, 2026
Merged

Improve README example code accuracy and completeness#538
larryaasen merged 3 commits intomainfrom
copilot/improve-readme-code-examples

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Several README examples were incomplete, inaccurate, or referenced APIs removed in v12.0, causing confusion for new users.

Changes

  • Alert Example: Added missing void main() with WidgetsFlutterBinding.ensureInitialized(); fixed const usage throughout
  • Removed upgraderDevice parameter: Dropped from Upgrader constructor in v12.0 but still listed in docs
  • Fixed UpgraderStoreController defaults (swapped in docs vs. actual code):
    • onFuchsia: UpgraderAppStore()null
    • oniOS: nullUpgraderAppStore()
  • Fixed Appcast Example: osVersion was referenced but never defined; replaced with Version(0, 0, 0) placeholder and added comment pointing to example/lib/main_appcast.dart for the full device_info_plus-based implementation; added oniOS alongside onAndroid
  • UpgraderStoreController iOS Appcast snippet: Replaced undefined osVersion with Version(0, 0, 0)
  • Minor: Added dart language tag to bare code fences; fixed missing const in Go Router snippet
static final upgrader = Upgrader(
  storeController: UpgraderStoreController(
    onAndroid: () => UpgraderAppcastStore(appcastURL: appcastURL, osVersion: Version(0, 0, 0)),
    oniOS: () => UpgraderAppcastStore(appcastURL: appcastURL, osVersion: Version(0, 0, 0)),
  ),
);

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ix documentation errors

Co-authored-by: larryaasen <325973+larryaasen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add important examples to README code section Fix and improve README example code Feb 20, 2026
Copilot AI requested a review from larryaasen February 20, 2026 13:14
Co-authored-by: larryaasen <325973+larryaasen@users.noreply.github.com>
Copilot AI changed the title Fix and improve README example code Improve README example code accuracy and completeness Feb 22, 2026
@larryaasen larryaasen marked this pull request as ready for review February 22, 2026 05:23
Copilot AI review requested due to automatic review settings February 22, 2026 05:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the README documentation by fixing several inaccuracies and making code examples more complete and runnable. The changes address issues introduced in v12.0 and correct long-standing documentation errors.

Changes:

  • Fixed README code examples to be complete and accurate, including proper initialization patterns
  • Corrected UpgraderStoreController default value documentation (swapped Fuchsia/iOS defaults)
  • Removed deprecated upgraderDevice parameter documentation (removed in v12.0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.08%. Comparing base (e8bf433) to head (f83ca46).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #538   +/-   ##
=======================================
  Coverage   93.08%   93.08%           
=======================================
  Files          12       12           
  Lines        1287     1287           
=======================================
  Hits         1198     1198           
  Misses         89       89           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@larryaasen larryaasen merged commit fd300a2 into main Feb 22, 2026
16 of 19 checks passed
@larryaasen larryaasen deleted the copilot/improve-readme-code-examples branch February 22, 2026 05:32
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