docs: Update mobile development guidelines to enforce safe navigation and typed navigators with fallback mechanisms.

This commit is contained in:
Achintha Isuru
2026-02-28 17:57:40 -05:00
parent 6902e84519
commit d3f3b0f70e
3 changed files with 13 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
# 03 - Design System Usage Guide
# 02 - Design System Usage Guide
This document defines the mandatory standards for designing and implementing user interfaces across all applications and feature packages using the shared `apps/mobile/packages/design_system`.
@@ -88,7 +88,9 @@ Padding(
The design system provides "Smart Widgets" these are high-level UI components that encapsulate both styling and standard behavior.
- **Standard Widgets**: Prefer standard Flutter Material widgets (e.g., `ElevatedButton`) but styled via the central theme.
- **Custom Components**: Use `design_system` widgets for non-standard elements or wisgets that has similar design across various features, if provided.
- **Custom Components**: Use `design_system` widgets for non-standard elements or widgets that have similar design across various features, if provided.
- **Navigation in Widgets**: Widgets that trigger navigation (e.g., Back buttons in `UiAppBar`) MUST use `Modular.to.popSafe()` or typed navigator methods to prevent blank screens or unexpected application states during stack pops.
- **Composition**: Prefer composing standard widgets over creating deep inheritance hierarchies in features.
## 9. Theme Configuration & Usage