--- name: ui-design description: Design Flutter UI screens and widgets for The Holy Qur'an app. Use when asked to build, design, create, or prototype a screen, widget, tile, dialog, or UI component. Enforces this app's configs layer (AppTheme, AppText, Space, AppDimensions, UIProps), fonts (Poppins / Noor), Screen wrapper, and class-widget rules. argument-hint: --- # UI Design — The Holy Qur'an Everything goes through the configs layer (`lib/configs/`). Never hardcode colors, font sizes or pixel values. Full API reference: `docs/architecture/configs.md`. ## Brand at a glance Calm, reading-first. Soft coral accent on white (light) or near-black (dark). Arabic Qur'an text in the **Noor** font, UI text in **Poppins**. Light and dark themes are both first-class (toggle in the drawer, persisted by `AppProvider`). ## Every widget ```dart class _Header extends StatelessWidget { // class, never a function const _Header(); @override Widget build(BuildContext context) { App.init(context); // always first final appProvider = Provider.of(context); // if you need isDark return …; } } ``` Screens wrap their body in `Screen(...)` (`lib/ui/widgets/core/screen/screen.dart`): it sets status-bar brightness, optional `keyboardHandler`, `PopScope`, drawers and FABs. Screen-private widgets are `part` files under `widgets/`. ## Color tokens — `AppTheme.c!.` | Token | Light | Dark | Use | |---|---|---|---| | `accent` | `#EE8F8B` coral | same | CTAs, FAB, dividers, highlights | | `primary` | `#5BA897` teal | same | borders (`UIProps.borderButton`), secondary accents | | `primaryDark` | `#896277` | same | rare, deep accent | | `background` | white | `#212121` | cards, surfaces | | `backgroundSub` | `#F0F0F0` | `#1C1C1E` | secondary surfaces | | `scaffold` / `scaffoldDark` | `#FEFEFE` / `#FCFCFC` | `#0E0E0E` | page backgrounds | | `text` / `textSub` / `textSub2` | black87 / greys | white70 | body, secondary, hints | | `shadow` / `shadowSub` | black 20% / 12% | same | `UIProps.cardShadow` | Rules: no `Color(0xff…)` inline (the coral `#ee8f8b` still appears in legacy dividers — use `AppTheme.c!.accent` instead); no `Colors.white`/`Colors.black` for surfaces/text — use `background`/`text`; `.withValues(alpha:)` not `.withOpacity`. ## Typography — `AppText.