flocks_phosphor 0.1.2
flocks_phosphor: ^0.1.2 copied to clipboard
Phosphor Icons para o Flocks: os 1.512 ícones nos 6 pesos, em fonte, com tree-shaking.
Changelog #
Every relevant change to this package. The format follows Keep a Changelog, and the numbering follows SemVer.
On the numbering. Nothing before
0.1.0was ever published, and this package moves in lockstep withflocks. An earlier2.0.0counted the internal rewrite from SVG to font — a milestone no external consumer ever saw, because nothing was released. The public line starts at0.1.0, next to the core; theflocksCHANGELOG explains why0.x.
0.1.2 - 2026-08-12 #
Nada mudou neste pacote. O número acompanha o flocks 0.1.2 pela razão que
o bloco acima dá: o contrato mora no core, e um adaptador numa linha própria só
criaria matriz de compatibilidade para manter. Uma entrada que fingisse conteúdo
seria pior que esta, que declara não ter.
O que mudou no core — toDartSnippet, flippedSwatch e kSwatchStops, e uma
superfície grande em circular que parou de cortar o próprio conteúdo — está no
CHANGELOG do flocks.
0.1.1 - 2026-08-10 #
Fixed #
- A licença volta a ser reconhecida. O
LICENSEtrazia o MIT verbatim seguido de um bloco de notas sobre os assets do Phosphor, e olicense_detectorcasa o arquivo INTEIRO contra o corpus SPDX — o texto apensado derrubava a confiança e o pub.dev reportava "No license was recognized". O arquivo passa a ser exatamente o texto SPDX; as notas de origem estão no README, e as licenças dos dois repositórios continuam viajando emassets/fonts/, onde sempre estiveram. - Suporte de plataforma (2 → 6) e compatibilidade com wasm, herdados do
flocks0.1.1: este pacote nunca teve nada de web emlib/, mas carregava os dois defeitos do core pela dependência. Ver o CHANGELOG doflocks.
0.1.0 - 2026-08-10 #
Added #
PhosphorIconProvider— the 55AppIconTokenof the Flocks contract, served from the Phosphor fonts.extraIconslets an app declare slugs of its own, as aconstmap carrying exactly the glyphs it lists.PhosphorWeightas an axis (thin·light·regular·bold·fill·duotone). One value restyles every icon in the app, the wayAppStylerestyles the boxes.- Generated classes for all 1,512 icons in each of the 6 weights. The 1,457 outside the contract are reached by identifier, so the tree-shaker keeps only the glyphs a build actually cites.
PhosphorDuotoneIconDataandPhosphorDuotoneIcon. Duotone is the one weight that is not 1:1 with a codepoint — each icon stacks a 20% patch under an opaque outline — so it needs a type of its own; with a plainIconDatahalf the drawing would go missing and nothing would fail to compile.- Architecture gates that fail when the generated code drifts from the catalog,
when the catalog drifts from the pinned tag, when a codepoint has no glyph in
the TTF, or when an
IconDatastops being constant — the last one would makeflutter build --releasefail in every app depending on this package.
Changed #
- The icons ship as fonts, not SVG. Flutter does not tree-shake assets: the
9,072 SVGs this package used to declare went into the bundle whole — 35 MB,
whether an app used twenty icons or a thousand. A font it knows how to prune:
--tree-shake-iconsreads the constantIconDataand rebuilds each TTF with only the glyphs cited. Measured on a ~20-icon example app,flutter build web --releasewent from 35.4 MB to 91 KB. The package itself went from 35 MB across 9,073 asset files to 3.0 MB across 8. (This is whyflocks_materialnever had the problem: Material icons are a font, and one Flutter already bundles.) - Codepoints now come from the
style.cssthatphosphor-icons/webpublishes next to each font, at the tag pinned intool/phosphor_catalog.dart— not from thecodepointfield ofphosphor-icons/core, which diverges from the fonts on 9 names and would have drawn the wrong icon in all six weights with nothing turning red.
Removed #
const AppIcon('airplane-tilt')no longer draws. A name outside the contract falls back toquestion; use the weight class, or declare the slug inextraIcons. Resolving arbitrary slugs at runtime would make all 1,512 names reachable at once and undo the tree-shaking that motivated the font.