flutter_archx 2.1.0
flutter_archx: ^2.1.0 copied to clipboard
A production-ready CLI tool to scaffold enterprise-grade Flutter projects with a scalable, clean architecture template featuring GetX state management, Dio networking, secure storage, and modular feat [...]
Changelog #
2.1.0 #
Added #
--color/-c. Sets the palette written into the generatedlib/app/theme/app_colors.dart. Takes a name —mono,blue,indigo,teal,green,purple,orange,red— or any hex code (--color "#0f766e",--color 0f766e,--color "#4af"). From a hex seed the tints, shades, 50–900 swatch, hue-rotated secondary, and readable button foregrounds are all derived. The wizard asks for it as step 7, with aCustom…choice for typing a hex code, and remembers the answer in~/.flutter_archx.json.create --listnow prints the palettes too.AppColors.onPrimary,AppColors.primaryDarkMode, andAppColors.onPrimaryDarkModein generated projects, wired into both themes'ColorSchemeand button styles. The dark theme no longer reuses a brand color that a dark palette would make invisible against a dark scaffold.
Changed #
- The default theme is now monochrome: black on a pure white background
(
#ffffffscaffold and surfaces,#111111primary and body text,#e5e5e5borders), inverting to white on near-black in dark mode. Pass--color bluefor the palette 2.0.x generated. Colored palettes keep the slate neutrals. - Splash screen, drawer header, and
AppButton's loading spinner take their foreground fromcolorScheme.onPrimaryinstead of hardcodedColors.white, so a light brand color stays readable. success,warning,error, andinfoare deliberately unchanged by the palette — a red error reads faster than a brand-tinted one.
2.0.1 #
Fixed #
- Generated projects were stuck on the splash screen.
SplashBindingregisteredSplashControllerwithGet.lazyPut, butSplashViewis a static branded screen that never touchescontroller, so the controller was never instantiated and theonReady()that routes the app onward never ran. It is now registered eagerly withGet.put.
2.0.0 #
Added #
- Interactive
createwizard. Runningflutter-arch createwith no flags now walks through project name, organization, description, preset, features, add-ons, and extras, then shows a summary and asks for confirmation before writing anything. flutter-arch add feature <name>. Scaffolds a feature module inside an existing project (binding, controller, view, models, widgets) and registers its route inapp_routes.dartandapp_pages.dart— the two files you would otherwise edit by hand for every new screen.--no-routeskips registration,--pathoverrides the route path. If the routing files can't be patched they are left untouched and the snippet to paste is printed.- Template presets —
minimal,starter,enterprise, andcustom(--preset). - Selectable features (
--features): splash, onboarding, login, register, forgot password, home, bottom-navigation shell, notifications, profile, settings, and an end-to-end CRUD module with search, pagination, detail, create/edit, and delete. - Selectable add-ons (
--add-ons): persisted theme switcher, localization (English + Arabic with RTL), offline banner, cached images with shimmer, build flavors, test scaffolding, GitHub Actions CI, and generated docs. --listprints every preset, feature, and add-on with its id.--yesskips all prompts for unattended and CI use.- Remembered organization: the wizard pre-fills your previous answer from
~/.flutter_archx.json. Unattended runs ignore it and stay deterministic. --git/--no-gitand--pub-get/--no-pub-getflags.
Changed #
- Routing is now generated from the selection.
app_routes.dartandapp_pages.dartcontain constants andGetPageentries only for the screens the project actually has — no dead routes, no unresolved imports. pubspec.yamlis generated from the selection. Only add-ons that were chosen contribute dependencies.- Replaced the eight hardcoded HR modules (employees, attendance, payroll, leave, recruitment, reports) with the generic feature catalog above.
- The app drawer is built from the selected screens instead of a fixed HR menu, and is omitted entirely when the bottom-navigation shell is used.
- Initialization moved into
lib/bootstrap.dartso every entry point shares one startup path;AppConfig.instance.init()is now actually called. - Git initialization now runs
git initexplicitly. Previously--no-gitpassed an unrelated--no-pubflag toflutter createand never affected git at all.
Fixed #
- Generated projects did not compile on current Flutter:
SystemUIOverlayStyleshould beSystemUiOverlayStyle, andCardThemeshould beCardThemeData. ItemRepositoryand other repositories are plain classes rather thanGetxService, so they can be mocked in tests without GetX lifecycle errors.- Selecting
registerorforgot_passwordwithoutloginnow pullsloginin automatically instead of generating links to a missing route.
1.0.0 #
- Initial release
flutter-arch create <project_name>command- Enterprise architecture template with 8 feature modules
- GetX state management and routing
- Dio-based networking layer with interceptors
- Secure and local storage wrappers
- Clean Architecture layers (data, domain, features)
- Shared widgets, components, dialogs, and layouts
- Configurable organization identifier (
--org) - Environment and flavor configuration support