Skip to content

feat!: migrate pin_code_fields 10.0.0 to Flutter 3.47 material_ui - #429

Open
bazookon wants to merge 1 commit into
adar2378:mainfrom
bazookon:feat/flutter-3.47-material-ui
Open

feat!: migrate pin_code_fields 10.0.0 to Flutter 3.47 material_ui#429
bazookon wants to merge 1 commit into
adar2378:mainfrom
bazookon:feat/flutter-3.47-material-ui

Conversation

@bazookon

Copy link
Copy Markdown

Summary

Migrate pin_code_fields to Flutter 3.47's standalone design-system packages and release it as 10.0.0.

Flutter 3.47 publishes material_ui and cupertino_ui as 1.0 packages on pub.dev, decoupling Material and Cupertino from the core SDK. The Flutter team asks ecosystem packages that switch to these libraries to treat it as a major release. See What's new in Flutter 3.47.

The PIN field API (MaterialPinField, PinInput, PinInputController, MaterialPinTheme, etc.) is unchanged. This is an import / dependency migration.

Breaking changes

  • Imports move from package:flutter/material.dart / package:flutter/cupertino.dart to package:material_ui/material_ui.dart / package:cupertino_ui/cupertino_ui.dart.
  • New dependencies: material_ui: ^1.0.0, cupertino_ui: ^1.0.0.
  • Minimum SDK: Dart ^3.12.0, Flutter >=3.44.0 (tested on Flutter 3.47.1 / Dart 3.13.1).
  • Apps that still use SDK Material must migrate or wrap mixed trees with MaterialUiCompatibilityBridge. Mixing ThemeData from the SDK with ThemeData from material_ui can cause type mismatches.

Consumer migration

dependencies:
  pin_code_fields: ^10.0.0
  material_ui: ^1.0.0
flutter pub get
dart fix --apply --code=migrate_design_widgets

If other packages still import package:flutter/material.dart:

MaterialApp(
  builder: (context, child) {
    return MaterialUiCompatibilityBridge(child: child!);
  },
)

Full guide: packages/pin_code_fields/migration/10.0.0/MIGRATION_GUIDE.md.

What changed in this PR

  • Bump package version 9.4.0 → 10.0.0.
  • Switch library, example, and tests to material_ui / cupertino_ui.
  • Pin published constraints (^1.0.0) instead of any.
  • Raise environment constraints to match material_ui.
  • Document the migration in the changelog, README, and a 10.0.0 guide.
  • Pin the local Flutter SDK to 3.47.1 via .fvmrc (FVM cache remains gitignored).

pin_code_fields_liquid_glass and showcase are not migrated here and can stay on 9.x / SDK Material until a follow-up.

Test plan

  • flutter test in packages/pin_code_fields (all tests passed)
  • flutter analyze in packages/pin_code_fields (no issues)
  • flutter analyze in packages/pin_code_fields/example (no issues)

BREAKING CHANGE: v10.0.0 depends on the standalone material_ui and
cupertino_ui packages. Apps must migrate off package:flutter/material.dart
or wrap mixed trees with MaterialUiCompatibilityBridge.
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.

1 participant