Flutter widgets, layouts, and navigation

Flutex uses a feature-first structure. Find the feature under lib/features/, then inspect its presentation screens and widgets.

Choose the right location

  1. Change a single feature’s layout inside that feature.
  2. Change shared controls in lib/common/widgets/ when the change should affect all users of that control.
  3. Update shared theme rules in lib/core/theme/.
  4. Review navigation in lib/core/router/ when adding or changing destinations.

Start by making one small change and checking all screens that use the affected widget.

Keep data behavior separate

Widgets should render state and call their controllers. Keep HTTP requests in the networking/repository layers and preserve the centralized authentication flow. A visual customization should not bypass permissions or introduce a second Dio client.

For changes to request or response fields, read the API documentation first. Generated models and providers require code generation after their source annotations change:

dart run build_runner build --delete-conflicting-outputs

Verify more than the normal state

Review loading, empty, error, and permission-denied screens. Test long translations, small devices, large text, and dark mode. Confirm that buttons cannot submit a mutation repeatedly while it is running.

Keep customizations in version control and record the files changed. This makes later Flutex updates easier to merge and troubleshoot.


Write Your Comment