Repository navigation
feat: add official Flutter SDK (usenavii) with SVG parity to @usenavii/core - #5
Merged
Merged
Conversation
feat(flutter): add SDK scaffold
Add faithful Dart ports of sha256, cyrb53/createRng, and seed helpers so Flutter matches @usenavii/core hashing and PRNG streams before select/render.
feat(flutter): port Phase 2 primitives with TS fixture parity
Resolve AvatarSpec from seed+options matching @usenavii/core, including mood, style hints, and built-in packs, locked by cross-language fixtures.
feat(flutter): port Phase 3 selectAvatar with TS spec parity
Add Dart parts/render pipeline so createAvatar matches @usenavii/core byte-for-byte on golden seeds (mood, packs, animated, sizes).
feat(flutter): port Phase 4 createAvatar with SVG parity
Port renderGroup/renderGroupTiles and build(BuildSpec) from @usenavii/core with byte-identical SVG goldens. Packs registry/SVG parity covered; unblocks NaviiGroup tile rendering ahead of Phase 6 widget polish.
feat(flutter): Phase 5 group stacks, build(), packs parity
Ship drop-in Flutter widgets mirroring @usenavii/react-native: SvgPicture rendering, Semantics (alt ?? title), group stack layout, and widget tests for determinism, size, empty seeds, and README usage snippets.
feat(flutter): Phase 6 Navii / NaviiGroup widgets
Add packages/flutter/example (seed, size, mood, NaviiGroup) with web/macOS targets, list usenavii in the root README Packages table, and document how to run the demo.
feat(flutter): Phase 7 example app and docs surface
Add flutter.yml (analyze/test/dry-run), document Flutter’s exclusion from the npm release matrix, and ship LICENSE/CHANGELOG/.pubignore for usenavii on pub.dev.
chore(flutter): Phase 8 CI workflow and pub.dev publish path
Paint the overflow chip with a Flutter-centered disc instead of SvgPicture. flutter_svg ignores dominant-baseline, which left engine counter text sitting high; renderGroupTiles SVG strings stay TS-identical for goldens.
fix(flutter): center NaviiGroup +N counter under flutter_svg
Contributor
Author
|
Hi @uxderrick, would appreciate it if you could review and merge. I am planning on implementing it into my Flutter manga reader app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an official Flutter / Dart SDK for Navii as
packages/flutter(pub package name:usenavii).This is a faithful Dart port of
@usenavii/coreplus thin widgets mirroring@usenavii/react-native— not a hosted-API wrapper and not a JS/WASM bridge. Same seed + same options → byte-identical SVG as the TypeScript engine.Architecture
packages/flutter/lib/src/core/(port ofpackages/core)Navii/NaviiGroupviaflutter_svg(SvgPicture.string)0.1.0-dev.1(parity target:@usenavii/core0.9.x)Features
Engine API (re-exported from
package:usenavii/usenavii.dart)createAvatar,selectAvatar,renderAvatar/renderAvatarInnerrenderGroup/renderGroupTilesbuild(BuildSpec)for non-seeded compositionbuiltInPacks,packRegistry,resolvePackssha256Hex,cyrb53,createRng,seed/seedFromEmail/normalizeEmailrandom()helperFlutter widgets
Navii— requiredseed; props map to engine options (styleHint→ enginestyle); Semantics viaalt ?? titleNaviiGroup— overlapping stack with+Ncounter; emptyseeds→ zero-size widget (RN returnsnull)animatedaccepted but painted statically in v1 (same as React Native — CSS keyframes do not run influtter_svg)Example + docs
packages/flutter/example/— seed field, size, mood,NaviiGroup(web + macOS)CI / publish
.github/workflows/flutter.yml—flutter pub get/analyze/test/dart pub publish --dry-runonpackages/flutter/**.github/workflows/release.ymlnpm matrix (five JS packages only)LICENSE, packageCHANGELOG.md,.pubignore, root CHANGELOG version-mapping tableCONTRIBUTING.mddocuments the Flutter lockstep exceptionParity / testing
Golden fixtures exported from
@usenavii/coreassert string-identical SVG for:selectAvatarspecscreateAvatar/renderAvatarrenderGroup/renderGroupTiles+ dimensionsbuild(BuildSpec)Non-goals (intentional)
Test plan
Notes