Register badge icon assets in pubspec.yaml
epic-achievement-badges-foundation-task-007 — Create the badge icon asset directory structure under assets/badges/ with locked/ and unlocked/ subdirectories. Add placeholder SVG or PNG icons for at least three badge types (beginner, intermediate, advanced) in both locked and unlocked states. Register all asset paths in pubspec.yaml. Ensure asset names follow the naming convention expected by BadgeIconAssetManager (e.g., badges/unlocked/beginner.png).
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
Use a flat directory registration in pubspec.yaml (assets/badges/) rather than listing every file individually — this avoids pubspec churn as more badge types are added later. Placeholder icons can be simple geometric shapes generated by any vector editor or even created programmatically as minimal valid PNG bytes. Ensure the locked variant uses visually muted styling (e.g., greyscale silhouette) so even at the asset level it communicates a locked state. Coordinate the exact path format with the BadgeIconAssetManager implementation (task-006) before creating files to avoid a mismatch.
If SVG is chosen, add flutter_svg to pubspec.yaml dependencies and confirm it is already present before adding a duplicate entry.
Testing Requirements
Write a widget test (flutter_test) that loads each of the six placeholder assets via AssetImage or flutter_svg SvgPicture.asset and asserts the image widget renders without error. Verify pubspec.yaml registration by running flutter pub get in CI and asserting exit code 0. Confirm that a unit test calling BadgeIconAssetManager.resolveIconPath for each badge type and state returns a non-empty string matching the expected path pattern.
Badge criteria are stored as structured JSON in badge_definitions. If the JSON schema for criteria (threshold counts, streak lengths, training completion flags) is not well-defined upfront, the evaluation service will be built against a moving target, requiring costly migrations and refactors.
Mitigation & Contingency
Mitigation: Define and document the criteria JSON schema in a shared type file before any repository code is written. Review the schema with all three organisations' badge requirements — especially Blindeforbundet's honorar thresholds — and version the JSON schema using a 'criteria_version' field from day one.
Contingency: If the criteria schema must change after services are built, write a Supabase migration to backfill existing rows and add a migration version column. Keep the evaluation service criteria parser isolated behind an interface so only one function needs updating.
Badge icon assets may not yet exist or may fail WCAG 2.2 AA contrast validation (minimum 3:1 for graphical objects) when rendered over design-token backgrounds. Missing or non-compliant icons could block UI epic delivery for Blindeforbundet, for whom screen reader and visual accessibility is non-negotiable.
Mitigation & Contingency
Mitigation: During this epic, implement the contrast-ratio validator in badge-icon-asset-manager and run it as a Flutter test against all candidate icon assets early. Coordinate with the design team to provide WCAG-compliant SVG icons in both locked and unlocked variants before the UI epic begins.
Contingency: If assets are late or fail contrast checks, ship placeholder icons that are guaranteed compliant (solid design-token colour fills with text labels) and swap in final assets post-QA without requiring a code change.