Add the app icon to the top of the navigation rail #242

Merged
raisondetredev merged 1 commit from refs/pull/242/head into main 2026-05-27 11:57:25 +02:00
raisondetredev commented 2026-05-27 11:54:44 +02:00 (Migrated from codeberg.org)

What

Adds the Halkyon icon as a brand mark at the top of the navigation rail (its leading slot, above the destinations), mirroring the logo placement in the StudySmarter reference.

How

  • Rendered as a small (40 dp) rounded tile via ClipRRect. The icon has a solid white background, so the rounded clip reads as a tidy app-icon tile that stays legible on any rail surface (light or dark) - rather than a bare white square.
  • Declares assets/icon/halkyon_icon.png as a bundled Flutter asset (the same PNG flutter_launcher_icons already reads at generation time). cacheWidth caps the decode so the 40-dp logo doesn't hold a full 1024� bitmap.
  • Only the rail (medium+ viewports) gets it; the compact bottom-nav has no logo slot, matching "navigation rail".

Verification

  • dart analyze (whole package) ? clean.
  • app_router_test (23) green - it renders the shell/rail, confirming the asset loads in tests and nothing regressed.

Note

This uses the white-background app icon as a rounded tile. If you'd rather have a transparent brand mark sitting directly on the rail (like the reference's logo), send a transparent-bg PNG and I'll swap it in (no tile).

## What Adds the Halkyon icon as a brand mark at the **top of the navigation rail** (its `leading` slot, above the destinations), mirroring the logo placement in the StudySmarter reference. ## How - Rendered as a small (40 dp) **rounded tile** via `ClipRRect`. The icon has a solid white background, so the rounded clip reads as a tidy app-icon tile that stays legible on any rail surface (light or dark) - rather than a bare white square. - Declares `assets/icon/halkyon_icon.png` as a bundled Flutter asset (the same PNG `flutter_launcher_icons` already reads at generation time). `cacheWidth` caps the decode so the 40-dp logo doesn't hold a full 1024� bitmap. - Only the rail (medium+ viewports) gets it; the compact bottom-nav has no logo slot, matching "navigation rail". ## Verification - `dart analyze` (whole package) ? clean. - `app_router_test` (23) green - it renders the shell/rail, confirming the asset loads in tests and nothing regressed. ## Note This uses the white-background app icon as a rounded tile. If you'd rather have a **transparent** brand mark sitting directly on the rail (like the reference's logo), send a transparent-bg PNG and I'll swap it in (no tile).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!242
No description provided.