flutter_simple_architecture 2.4.0
flutter_simple_architecture: ^2.4.0 copied to clipboard
A robust Flutter bootstrapping tool and project template emphasizing a clean, layer-first architecture with strict state management.
2.4.0 #
Features #
- Secure Session Observability: Added
LogSanitizerand Breadcrumb system toLoggerService. Automatically captures sanitized session timelines (Network, State, Transactions) for crash reporting without leaking PII. - Environment Management: Implemented
AppEnvfor switching between Dev, Stg, and Prod via--dart-define=ENV=.... - Global Connectivity monitoring: Integrated
ConnectivityServiceto automatically notify users of internet status changes via the global side-effect system. - Unified Persistent Storage: Combined
shared_preferencesandflutter_secure_storageinto a singleStorageService. - CLI Localization Scaffolding: Added
fsa generate l10n <key> <value>to automate.arbupdates and code generation. - Repository Unit Tests: The
fsa generate repositorycommand now creates a corresponding unit test file usingmocktailandMockApiClient.
Improvements #
- Global Error Handling: Integrated
FlutterErrorandPlatformDispatcherhooks inmain.dartfor centralized, secure crash reporting. - Transaction Rollback: Enhanced
BaseRepositorywithrunTransactionfor atomic multi-step operations. - Security: All logging mechanisms now recursively scrub sensitive data (tokens, passwords, PII) before outputting.
2.3.0 #
Features #
- Production Network Layer: Integrated
Diowith centralizedApiClientand interceptors for automated logging and failure mapping. - Context-less Navigation: Added
NavigationServiceallowing Notifiers to perform routing withoutBuildContext. - CLI Expansion: Added
repositoryandentitygenerators to thefsatool. - Automated Testing: Every generated page now includes a corresponding widget test boilerplate.
- Design System Expansion: Added
AppTextFieldsealed widget for consistent form inputs. - Form Support: Introduced
AppFormMixinfor structured form state management within Notifiers. - Shimmer System: Integrated
ShimmerandSkeletonBoxintoAppViewBuilderfor standardized loading UIs.
Improvements #
- UI State Pattern: Migrated from sealed union states to Data Class + Status Enum pattern to preserve state during transitions.
- Global Side Effects: Centralized side-effect listening at the root (
main.dart) usingnavigatorKey. - Hook Optimization: Restrict
flutter_hooksto Dumb Components; Logic-heavy views now use pureConsumerWidget. - Documentation: Added comprehensive industry-grade engineering documentation for the CLI and source code.
2.1.0 #
Improvements #
- CLI Templates Refinement:
- Union States: Now generated using
sealed classfor better exhaustiveness checking withstate.whenor pattern matching. - Sync States: Now generated using
abstract classwith a private internal constructor (const UIState._()), following the project's entity pattern.
- Union States: Now generated using
- Consistency: Unified state templates across
pageandasynccomponent generators. - Robustness: Fixed syntax issues in generated boilerplate for sync state models.
2.0.0 #
⚠️ BREAKING CHANGES #
- Core Rename:
ViewBuilderis nowAppViewBuilder. - Terminology Shift:
- Smart is now Async.
- Simple is now Sync.
- CLI Flags:
fsa generate page --type=smartis now--type=async.fsa generate page --type=simpleis now--type=sync. - Generator Command:
fsa generate smartis nowfsa generate async.
Improvements #
- Renaming: Renamed
ViewBuildertoAppViewBuilderto follow core widget naming conventions. - Terminology Update: Renamed Smart to Async and Simple to Sync for more intuitive architecture guidance. Updated CLI flags and documentation accordingly.
- Architectural Rule: Added a strict rule that
AppViewBuildervariants should only be used if the view needs to listen to an initial async task.
1.2.2 #
- State Management: Pivoted to
.autoDisposeproviders by default across the entire architecture to optimize memory usage and state cleanup. - Documentation: Updated
README.mdandGEMINI.mdwith strict guidelines on when to use Smart, Simple, and Static pages, and the new auto-dispose policy. - Guidance: Aligned documentation with the new
fsa-validatorskill heuristics. - Testing: Fixed
widget_test.dartto supportProviderScopeand match the new Todo app template.
1.2.1 #
- Documentation: Updated
README.mdwith strict guidelines on when to use Smart, Simple, and Static pages. - Guidance: Aligned documentation with the new
fsa-validatorskill heuristics.
1.2.0 #
- New Page Types: Added
--typeflag tofsa generate pagesupportingsmart(default),simple, andstaticarchetypes. - Architectural Refinement: Reduced boilerplate for simple features by allowing data-class state or stateless pages.
- Internal: Fixed casing logic in generators to support CamelCase inputs correctly.
1.1.0 #
- New Architectural Pattern: Introduced the
SideEffectNotifier for managing non-interactive events (Success, Failure, Info, Warning). - AppViewBuilder Enhancement: Added the
onSideEffecthook toAppViewBuilderfor customizable side-effect handling (e.g., SnackBars instead of Dialogs). - Generator Updates: The CLI now generates Notifiers and Views pre-configured with the
SideEffectpattern. - Improved Scaffolding: Added automatic copying of architecture templates for globally activated CLI usage.
1.0.2 #
- Fixed template directory resolution when the CLI is run as a globally activated package.
- Improved reliability of
fsa createin external directories.
1.0.1 #
- Improved
fsa createbootstrapping logic to ensure all dependencies and configurations are correctly applied. - Cleaned up
lib/main.darttemplate by removing default Flutter counter boilerplate. - Added copying of
.fvmrcandGEMINI.mdto new projects. - Added automated tests for project bootstrapping.
1.0.0 #
- Initial release of FSA (Flutter Simple Architecture).
- Integrated CLI tool with
createandgeneratecommands. - Layer-first architecture template including
core,domain, andpresentation. - Centralized design system with sealed widgets.
- Functional error handling with
fpdart. - Automated logging with
LoggerService.