Index of every page on this site: llms.txt
All skills
randalschwartz avatar

/flutter-sdk-changelog

@3231ba2
Run it yourself

Authoritative guide for Flutter framework APIs, widget lifecycle deprecations, design package unbundling, and version changelogs from Flutter 1.0 through Flutter 3.x+. Use this skill whenever authoring Flutter widgets, inspecting flutter sdk constraints, handling deprecated widgets (WillPopScope, withOpacity, MaterialState, FlatButton), migrating to standalone design libraries (material_ui, cupertino_ui), verifying widget API availability against the project's Flutter minSdk, or upgrading legacy Flutter applications.

Use this Skill: https://skilld.dev/gh/randalschwartz/dart-sdk-skills/flutter-sdk-changelog

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesrescuing-legacy-flutter-apps.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rescuing Legacy Flutter Apps: Step-by-Step Modernization Runbook

A complete tactical guide for upgrading legacy Flutter applications (Flutter 1.x / 2.x / early 3.x) to modern Flutter (3.24+).


🧭 The 5-Phase Upgrade Pipeline

┌────────────────────────────────────────────────────────┐
│ Phase 1: Toolchain & SDK Baseline Check                │
├────────────────────────────────────────────────────────┤
│ Phase 2: Dart Sound Null Safety & Syntax Bridge        │
├────────────────────────────────────────────────────────┤
│ Phase 3: Flutter Framework & Widget Deprecation Fixes  │
├────────────────────────────────────────────────────────┤
│ Phase 4: Material 3 & UI Theme Modernization           │
├────────────────────────────────────────────────────────┤
│ Phase 5: Routing & Modern Reactive State Migration    │
└────────────────────────────────────────────────────────┘

Phase 1: Toolchain & SDK Baseline Check

  1. Verify Active Flutter Version:
    flutter --version
  2. Update pubspec.yaml Environment Bounds:
    environment:
      sdk: '^3.5.0' # Or ^3.13.0
      flutter: '>=3.24.0'
  3. Run Package Resolution:
    flutter pub upgrade
  4. Apple Platform Toolchain Boundary (Flutter 3.44+ Swift Package Manager):
    • When stepping across the Flutter 3.44 boundary, the Flutter build toolchain defaults to Swift Package Manager (SPM) for Apple platform plugins instead of CocoaPods.
    • Running flutter run automatically generates FlutterGeneratedPluginSwiftPackage attached to the Runner Xcode project.
    • Flutter continues to support CocoaPods as a fallback for plugins that have not yet published a Package.swift manifest.
    • Once all plugins provide SPM support, remove legacy CocoaPods artifacts:
      cd ios
      pod deintegrate
      rm -rf Podfile Podfile.lock Pods .symlinks
      cd ..
      flutter build ios --config-only
    • For Add-to-App projects upgrading to Flutter 3.44+, generate the SPM framework wrapper via flutter build swift-package --platform ios.

Phase 2: Dart Sound Null Safety & Syntax Bridge

If the project originated before Flutter 2.0 (pre-null safety):

  1. Replace @required with language keyword required.
  2. Explicitly type nullable fields with ?.
  3. Remove obsolete new keywords.
  4. Convert constructor parameters to super.key (Dart 2.17+).

Phase 3: Flutter Widget Deprecation Fixes

Run flutter analyze and systematically resolve compiler warnings using modern equivalents:

  1. WillPopScope ➔ PopScope:
    • Set canPop: false and handle confirmation logic inside onPopInvokedWithResult.
  2. Color.withOpacity(0.5) ➔ Color.withValues(alpha: 0.5):
    • Fixes precision loss on wide-gamut displays.
  3. MaterialState ➔ WidgetState:
    • Update WidgetStateProperty.resolveWith(...) for button and control states.
  4. TextTheme 2021 Update:
    • Replace headline6 with titleLarge, bodyText2 with bodyMedium.
  5. ScaffoldMessenger:
    • Replace Scaffold.of(context).showSnackBar with ScaffoldMessenger.of(context).showSnackBar.

Phase 4: Material 3 & UI Theme Modernization

  1. Set useMaterial3: true in your root ThemeData.
  2. Generate theme with ColorScheme.fromSeed(seedColor: ...).
  3. Replace BottomNavigationBar with NavigationBar.
  4. Replace ToggleButtons with SegmentedButton.
  5. Migrate imports to decoupled design packages (material_ui and cupertino_ui) via dart fix --apply --code=migrate_design_widgets.

Phase 5: Routing & Modern State Architecture

  1. Routing Modernization:
    • Replace string-based Navigator.pushNamed('/route') with type-safe routing like kaisel or MaterialApp.router.
  2. State Management:
    • Replace heavy, boilerplate-ridden legacy state stores with modern synchronous reactivity (bloc_signals / signals).

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert11d3 checks · Risk CRITICAL
  • Gen Agent Trust Hub12d

    This skill provides a guide for Flutter SDK migrations and widget deprecations. A security concern exists because the skill references a domain (flutterreleases.com) that is blacklisted by automated scanners for malicious activity. Additionally, the skill presents speculative or non-standard framework changes as authoritative SDK requirements, which could mislead developers into adopting third-party dependencies.

  • Socket11d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

Signed by skilld at 3231ba2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 2 weeks ago

README badge

README badge for randalschwartz/dart-sdk-skills/flutter-sdk-changelog