Skip to content

fix: update asset loader#31

Merged
juan-campuzano merged 3 commits into
mainfrom
fix/icon-loader
May 5, 2026
Merged

fix: update asset loader#31
juan-campuzano merged 3 commits into
mainfrom
fix/icon-loader

Conversation

@juan-campuzano

Copy link
Copy Markdown
Collaborator

resolve #29

Font loading and registration improvements

  • Updated loadAppFonts in asset_loader.dart to register each font under every possible alias (both the raw family name and any packages/<pkg>/<family> variants), ensuring icons render correctly in golden tests regardless of how IconData is constructed. [1] [2]
  • Introduced the fontFamilyAliases helper, which derives all aliases a font should be registered under based on its manifest entry. This logic is now used in loadAppFonts and is tested extensively. [1] [2]

Documentation and test updates

  • Improved documentation for loadAppFonts, fontFamilyAliases, and the IconExtension.convertToGolden method to clarify usage and indicate that manual conversion is now rarely needed. [1] [2]
  • Added comprehensive unit tests for fontFamilyAliases to verify that all font aliasing scenarios are handled correctly.

Backwards compatibility

  • Marked IconExtension.convertToGolden as deprecated, recommending use of loadAppFonts instead, but retained it for backwards compatibility and rare edge cases.

@juan-campuzano juan-campuzano merged commit fb2def5 into main May 5, 2026
2 checks passed
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.

Icon import review in the golden test

2 participants