moarch 2.6.0
moarch: ^2.6.0 copied to clipboard
Flutter CLI — scaffold Clean Architecture projects with Riverpod, FVM and your own conventions.
2.6.0 #
Features #
AppCalendar(moarch create widget calendar) — the inline month grid, for when the month itself is the content rather than one answer in a form.AppDateInputstill opens the platform picker; this is its sibling for agendas, booking screens and streaks. A wrapper over table_calendar that keeps its parameters out of your screens: colors come fromAppInputVariantlike the rest of the family, and the package is added topubspec.yamlfor you.eventsis re-keyed to the day each entry falls on. TwoDateTimes in one day are not equal, which is the usual reason a marker never appears — so you can pass the instants your data already carries, and two appointments at 09:00 and 14:00 count as two dots on one day rather than missing the grid.onMonthChangedreports the month's own bounds, not the six weeks drawn around it — the range to fetch events for. For the two-week and week formats it reports their own span.canChangeFormatoffers the month/2-week/week toggle, and only then is a vertical swipe live; without it a swipe means one thing.- No
onSelectedmakes it a read-only display, andselectableDaygreys out the days that refuse a tap. - It lives in its own
lib/shared/widgets/calendar/folder rather than alongside the fields.
AppActionSheet(moarch create widget action-sheet) — the sheet behind a three-dot button or a long press. Material rows on Android and the iOS grouped cards elsewhere, off the same platform splitAppDateInputuses for its pickers; either shape can be forced.- Rows resolve to a value, so
show<T>hands back what was picked andnullwhen it was dismissed — one honest "the user backed out" branch. - A row's
onTapruns after the sheet has closed, rather than while it is closing, where a handler that pushes a route fights the navigator for it. AppSheetAction.destructivedraws in the theme's error color. It confirms nothing on its own — pair it withAppConfirmDialogwhen the answer should be deliberate.- It takes a
BuildContextrather than the router's navigator key, unlikeAppDialogsandAppBottomModals, so it costs the project no GoRouter.
- Rows resolve to a value, so
Fixes #
moarch create model --emptygenerated a factory that could not compile. It patches<model>_entity.dart, whose class is<Model>Entity, but named the factory after the model alone —factory LoginResponse.empty() => LoginResponse(...)insideclass LoginResponseEntity. The guard that was meant to stop a second run looked for that same wrong name, so it never matched and every re-run stacked another broken factory into the file.- A field whose type carries a comma was silently dropped from
.empty()and fromcopyWith. The type was matched with a character class holding neither a comma nor a space, soMap<String, dynamic> meta;was not a field as far as the parser was concerned — and the factory it built came out missing a required argument. Types are now read up to the last identifier on the line and then validated, which also ends the false positives that class allowed:return value;in a method body was being read as a field namedvalueof typereturn, andString get title;as a field namedtitle. - An entity file declaring a second class had the two spliced together. The
parser took a class name and ignored it, reading every field in the file, so
AddressEntity's fields turned up inUserEntity'scopyWith. It now scopes to the named class's body — and so does the injection:create entity-copysappendedcopyWithand the==/hashCodepair at the file's last closing brace, landing them on whichever class was written last, after stripping the existing equality members from every class in the file. create empty-factoriesreported replacements it had not made. Its pattern only matches an arrow-bodied.empty(), so a hand-written block-bodied one fell throughreplaceFirstunchanged while the log claimed it had been replaced. It now leaves that factory alone and says so, and a factory already matching what would be written is reported as skipped — which is what theSkipped :line in the summary always claimed to count and never did.