moarch 2.5.0 copy "moarch: ^2.5.0" to clipboard
moarch: ^2.5.0 copied to clipboard

Flutter CLI — scaffold Clean Architecture projects with Riverpod, FVM and your own conventions.

2.5.0 #

Features #

  • AppAsyncView (moarch create widget async-view, generated by init) — takes one AsyncValue and draws the four states it can be in: a shimmered shape while the first load runs, ErrorView with a retry, EmptyView when the screen says its data counts as empty, and your body when there is something to show. A reload over existing data leaves that data on screen rather than replacing a list mid-read with a spinner, and an error carrying no message of its own shows no detail instead of a stringified exception.
  • ref.listenAction(...) (moarch create widget action-listener, generated by init) — surfaces the one-shot error / success fields a generated state already carries as an AppToast. Pass onError / onSuccess to navigate or log instead; providing one replaces the toast for that outcome rather than adding to it, and a single action only ever reports one of the two.
  • The generated feature view is built on both. moarch create feature used to write a .when(...) mapping by hand and leave // SHOW UI ERROR and // SHOW UI SUCCESS as comments in every feature. It now wires the two widgets up, passes its own body as the skeleton shape, and offers the retry ErrorView draws a button for. It also writes both widgets if the project predates them, so the view it generates always compiles.
  • AppMultiSelectInput (moarch create widget multi-select) — AppDropdownInput's plural: the same id/label entity list, any number selected, ticked in the search sheet with a per-row checkbox and a Done button. Shows its picks as removable chips, as labels, or as "3 selected"; enforces required, minSelected and maxSelected, and stops the unticked rows at the ceiling rather than letting the form refuse the pick afterwards.
  • SearchPickerSheet.showMulti(...) — the multi-select half of the sheet the dropdown and the country picker already open. It works on its own copy of the selection, so a dismissed sheet changes nothing and an empty result is a deliberate "none of them".
  • AppDateRangeInput (moarch create widget date-range-input) — a read-only field holding a start and an end date, with a maxDays rule the picker itself cannot express. It holds a DateTimeRange rather than the text of one.
  • AppFilePickerField (moarch create widget file-input) — an attachment field: an area that opens whichever picker the app already uses, and a row per file with a thumbnail, a readable size and a remove button. It imports no picker package, so it costs the project no dependency it had not already chosen.
  • AppRating (moarch create widget rating) — stars both ways round: tappable with onChanged, a read-only score without it. Halves come from tapping the left half of a star, and a display-only rating stays out of Form.validate().
  • AppTabs / AppTabBar (moarch create widget tabs) — AppTabs owns the controller and puts the views under the bar, replacing it when the tab count changes; AppTabBar is the PreferredSizeWidget half that drops into AppAppBar's bottom slot. Underline or pill indicator.
  • AppDrawer (moarch create widget drawer) — the side menu, reading AppBottomNav's destination list, with header and footer slots. It closes itself after a pick, and does nothing when the same widget is pinned beside the content instead.
  • AppNavRail and AppAdaptiveNav (moarch create widget nav-rail) — the vertical navigation a tablet shows instead of a bottom bar, and the scaffold that picks between them off the 600dp short-side breakpoint. All three nav widgets read one AppNavDestination list.
  • AppFab (moarch create widget fab) — the screen's floating action, circular or extended off one parameter, wearing AppButtonVariant / AppButtonType rather than a vocabulary of its own. isLoading swaps the icon for a spinner without resizing the button, and heroTag is exposed for the two-FABs-on-one-screen case.
  • AppTimeline (moarch create widget timeline) — a vertical sequence of events joined by a connector, with done/current/pending/failed nodes. AppTimeline.entryBuilder hands you one row for a lazy list.
  • AppCarousel (moarch create widget carousel) — swipeable pages with stretching dots, optional peek and auto-advance. The timer stops for good on the first swipe and never starts when the platform asks for reduced motion; AppCarouselDots is usable on its own.

Improvements #

  • The design-system preview covers AppPhoneInput and AppAsyncView — the phone field has been in the kit since 2.4.0 without a preview, and the async view's four states are steppable in it. A new test fails if a widget joins the catalog without either a preview section or an explicit, reasoned exemption, so the screen can no longer fall behind the kit unnoticed.
  • moarch create feature records what it writes into shared/widgets/ in .moarch.yaml, so moarch update can tell those files apart from ones you have since edited.
2
likes
0
points
6.17k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter CLI — scaffold Clean Architecture projects with Riverpod, FVM and your own conventions.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, mason_logger, path, yaml, yaml_edit

More

Packages that depend on moarch