Skip to content

Commit 5606bfe

Browse files
Comm4nd0claude
andcommitted
fix(mobile): pin phosphor_flutter to a fork that handles sealed IconData
phosphor_flutter 2.1.0 (the latest on pub.dev, May 2024) extends Flutter's `IconData`, which 3.43+ sealed as `final`. Building against Flutter 3.44 fails the kernel_snapshot Dart AOT step with: phosphor_icon_data.dart:5:32: Error: The class 'IconData' can't be extended outside of its library because it's a final class. class PhosphorIconData extends IconData { Upstream PR #62 turns PhosphorIconData into a typedef for IconData but has been open with no maintainer response since May 2026, and the package's last release is from May 2024 — effectively unmaintained. Pin phosphor_flutter to the PR author's fork at a specific commit SHA via dependency_overrides so the lockfile stays reproducible. None of the removed classes (PhosphorFlatIconData, PhosphorDuotoneIconData) are referenced by the app — only PhosphorIcon, PhosphorIconsDuotone, and duotoneSecondaryColor, all of which the fork keeps API-compatible. Drop the override when upstream publishes a fixed version (or when we migrate to a maintained icon library). phosphor-icons/flutter#61 phosphor-icons/flutter#62 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 278ba50 commit 5606bfe

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

mobile/pubspec.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,11 @@ packages:
763763
phosphor_flutter:
764764
dependency: "direct main"
765765
description:
766-
name: phosphor_flutter
767-
sha256: "8a14f238f28a0b54842c5a4dc20676598dd4811fcba284ed828bd5a262c11fde"
768-
url: "https://pub.dev"
769-
source: hosted
766+
path: "."
767+
ref: "514f0a883571c4453dbd6ee3041d1dcba4fb8fc7"
768+
resolved-ref: "514f0a883571c4453dbd6ee3041d1dcba4fb8fc7"
769+
url: "https://github.com/subarnaPdl/phosphor_icons.git"
770+
source: git
770771
version: "2.1.0"
771772
platform:
772773
dependency: transitive

mobile/pubspec.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ dev_dependencies:
3636
flutter_launcher_icons: ^0.13.1
3737
flutter_native_splash: ^2.4.0
3838

39+
# phosphor_flutter 2.1.0 (the latest on pub.dev as of May 2026) extends
40+
# Flutter's `IconData`, which was sealed `final` in Flutter 3.43. The
41+
# package is effectively unmaintained — upstream PR #62 with the fix has
42+
# been open since May 2026 with no maintainer response. Pin to the PR
43+
# author's fork at a specific commit so the lockfile is reproducible.
44+
# When upstream finally publishes a fix (or we migrate to a different
45+
# icon library), drop this override.
46+
# https://github.com/phosphor-icons/flutter/issues/61
47+
# https://github.com/phosphor-icons/flutter/pull/62
48+
dependency_overrides:
49+
phosphor_flutter:
50+
git:
51+
url: https://github.com/subarnaPdl/phosphor_icons.git
52+
ref: 514f0a883571c4453dbd6ee3041d1dcba4fb8fc7
53+
3954
flutter:
4055
uses-material-design: true
4156
# Flutter 3.44 auto-enables Swift Package Manager and tries to add the

0 commit comments

Comments
 (0)