Skip to content

[BUG] Color.toARGB32 removed – html_editor_enhanced 2.7.1 build error #589

@LafepuCollapse

Description

@LafepuCollapse

Describe the bug
When using html_editor_enhanced: ^2.7.1 with Flutter 3.27.x, the build fails because the package still calls the method Color.toARGB32(), which has been removed from the Flutter framework.

To Reproduce
Steps to reproduce the behavior:
1. Create a new Flutter project (Flutter 3.27.x, Dart SDK >=3.5).
2. Add html_editor_enhanced: ^2.7.1 to pubspec.yaml.
3. Run flutter build apk or flutter run.
4. See build errors: Error: The method 'toARGB32' isn't defined for the class 'Color'.
Expected behavior
The package should use Color.value instead of Color.toARGB32(), so the project can compile on the latest Flutter versions.

Screenshots
N/A (it’s a compiler error, but logs are attached above).

Device:
• Flutter SDK: 3.27.4 (stable)
• Dart SDK: 3.5.x
• Android Studio / VSCode on macOS
• Target: Android (but fails at compile time, so reproducible everywhere)

Additional context
• This seems fixed in newer releases (3.x), but 2.7.1 is still broken.
• A simple patch replacing .toARGB32() → .value in toolbar_widget.dart resolves the problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions