petracore_flutter_frontend_starter 1.0.7
petracore_flutter_frontend_starter: ^1.0.7 copied to clipboard
A powerful CLI tool and package for generating Flutter projects with clean architecture, Firebase integration, and best practices.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.7 - 2026-05-10 #
Added #
- π Pagination Feature Generation: Pagination feature is now auto-generated during
petracore init- 6 files generated:
pagination_index.dart,pagination_bloc.dart,pagination_event.dart,pagination_state.dart,paginated_list_builder.dart,paginated_list_view.dart - Uses
UseCaseabstraction from core layer for data fetching PaginationBlocwithFetchPaginatedResultevent andPaginationResultLoaded/PaginationErrorstatesPaginatedListBuilderwidget for easy integration with any featurePaginatedListViewscroll-detecting widget with auto-load at bottom
- 6 files generated:
- π Guide Document:
agent-docs/pagination_feature_generator_guide.mdcreated documenting the pagination feature architecture
Fixed #
- π§ Email Controller Re-enabled:
EmailControlleris now generated whenincludeForgotPasswordis true (was previously only generated for the removed get-started screen) β fixes missingEmailControllerin forgot password screens - π Route Model Conflict: Renamed
RouteβAppRouteto eliminate compilation errors in generated projects caused by naming collision withpackage:flutter/widgets.dart
1.0.6 - 2026-05-10 #
Added #
- π Main App Feature:
main_appfeature withDashboardScreenis now auto-generated duringpetracore initAppRoutes.dashboardroute constant pre-defined inroutes_template.dart- GoRouter entry for
DashboardScreenpre-wired inrouter_template.dart mainAppBlocProviderpre-registered in sharedbloc_provider.dart- Feature barrel, presentation barrel, and controller index all auto-generated
- Dashboard directory structure created in
_createAdditionalDirectories()
- π Login-to-Signup Navigation: Login screen includes "Don't have an account? Sign up" link navigating via
context.goNamed(AppRoutes.signup.name) - π Signup-to-Login Navigation: Signup screen includes "Already have an account? Log in" link navigating via
context.goNamed(AppRoutes.login.name) - π Guide Document:
agent-docs/MAIN_APP_FEATURE_SETUP.mdcreated documenting the main_app feature architecture
Changed #
- πΊοΈ Splash Screen Navigation: Logged-out users now navigate to
AppRoutes.logininstead of the old get-started path - πΊοΈ Welcome Screen Navigation: "Get Started" button now navigates to
AppRoutes.logininstead ofAppRoutes.getStarted - π·οΈ Route Model Renamed:
Routeclass renamed toAppRouteto avoid conflict with Flutter's built-inRouteclass β all references updated inroutes_template.dart,auth_flow_generator.dart, andfeature_generator.dart - β Get Started Screen Disabled:
includeGetStartedScreendefaults tofalse. Interactive prompt removed. All generator references (screens, controllers, routes, constants) cleaned up - β»οΈ
projectBlocProviderTemplate: Now acceptsProjectConfigparameter to support package name interpolation in imports
Fixed #
- π§ Email Controller Re-enabled:
EmailControlleris now generated whenincludeForgotPasswordis true (was previously only generated for the removed get-started screen) β fixes missingEmailControllerin forgot password screens - π Route Model Conflict: Renamed
RouteβAppRouteto eliminate compilation errors in generated projects caused by naming collision withpackage:flutter/widgets.dart
1.0.0 - 2024-09-03 #
Added #
- π Initial release of PetraCore Flutter Frontend Starter
- ποΈ Project initialization command (
petracore init) - π Feature generation command (
petracore feature) - π₯ Firebase integration support (Firestore, Analytics, Cloud Messaging)
- π§© BLoC pattern implementation with Hydrated BLoC
- π± Responsive design with ScreenUtil
- π¨ Comprehensive UI component library
- π Secure storage and environment variable support
- π£οΈ Declarative navigation with GoRouter
- π¦ Clean Architecture implementation
- π§ͺ Testing infrastructure setup
- π Comprehensive linting rules
- π§ VS Code configuration
- π Detailed documentation and examples
Features #
- Project Generation: Complete Flutter project with clean architecture
- Feature Generation: Modular feature creation with data/presentation layers
- Firebase Setup: Pre-configured Firebase integration
- State Management: BLoC/Cubit with state persistence
- UI Components: Reusable buttons, inputs, scaffolds, loading states
- Network Layer: Dio HTTP client with logging and error handling
- Code Generation: Freezed models and JSON serialization
- Extensions: Useful string, context, and utility extensions
- Validation: Input validation and form handling patterns
Supported Platforms #
- β iOS
- β Android
- β Web
- β macOS
- β Windows
- β Linux
Dependencies #
- flutter_bloc ^8.1.3
- hydrated_bloc ^9.1.5
- go_router ^10.0.0
- flutter_screenutil ^5.4.0
- dio ^5.3.3
- firebase_core ^3.12.1
- cloud_firestore ^5.6.5
- And many more carefully selected packages
1.0.1 - 2024-09-16 #
Added #
- π¨ AppBarV1 Component: Comprehensive app bar component with theming support
- Full integration with design tokens and theme system
- Multiple variants:
AppBarV1,AppBarV1Transparent,AppBarV1Secondary - Customizable properties: title, actions, colors, elevation, center title
- PreferredSizeWidget implementation for proper sizing
- π TabBarV1 Component: Feature-rich tab bar component with theming
- Multiple variants:
TabBarV1,TabBarV1Scrollable,TabBarV1Minimal - Comprehensive customization: colors, text styles, indicators, padding
- Built-in hover and pressed state handling
- Scrollable support with proper physics
- Multiple variants:
- ποΈ App Bars Directory: Added
app_bars/folder structure to project generation - π§ Project Generator Updates: Updated to include app bar components in generated projects
- π± Sample Integration: Updated sample home screen to demonstrate AppBarV1 usage
- π¨ Design System Integration: All components fully integrated with the app's design tokens
Improved #
- Enhanced project structure with proper app bar component organization
- Better component documentation and usage examples
- More consistent theming across all generated components
1.0.3 - 2024-09-22 #
Fixed #
- Build Runner Execution: Fixed duplicate build_runner commands during auth flow generation
- Resolved command execution format issues in FeatureGenerator and AuthFlowGenerator
- Commands now properly split into command and arguments arrays
- Eliminated redundant build_runner calls when generating auth features
- Template Syntax Errors: Fixed syntax error in verify_dto template
- Corrected
Json Map<String, dynamic>toJson()toMap<String, dynamic> toJson() - Resolved build_runner compilation errors in auth flow generation
- Corrected
Improved #
- Logging System: Complete overhaul of CLI logging for better readability and spacing
- Removed emoji-heavy logging in favor of clean, professional symbols
- Added proper visual hierarchy with box drawing characters and bullets
- Implemented consistent spacing and indentation throughout
- Added new logging methods:
spacer(),section(),item(),keyValue() - Replaced
mason_loggerdependency with lightweight custom implementation - Enhanced header formatting with bordered boxes
- Improved step indicators with arrow symbols (β)
- Added success checkmarks (β), warning symbols (β ), and error marks (β)
- Code Generation Logic: Enhanced conditional DTO generation in AuthFlowGenerator
request_otp_dto.dartnow properly generates when--otpflag is enabled- Improved feature flag handling for auth flow components
- Better separation of concerns between FeatureGenerator and AuthFlowGenerator
Enhanced #
- Test Suite: Expanded test coverage for auth flow generation
- Added comprehensive auth flow testing with both basic and complete options
- Enhanced test script with better command-line options and validation
- Added separate tests for OTP functionality and email verification
- Improved error reporting and test result validation
- CLI Output Formatting: Significantly improved user experience
- Consistent formatting across all commands (init, feature, auth)
- Better structured success messages and next steps
- Enhanced selected features display with bullet points
- Improved file generation progress reporting
- Professional, clean appearance without visual clutter
Technical Improvements #
- Command Architecture: Refined command execution patterns
- Better error handling in CommandUtils.runCommand
- Improved working directory management
- Enhanced verbose logging for debugging
- Project Configuration: Better project detection and configuration reading
- Improved ProjectConfigReader with fallback mechanisms
- Enhanced directory structure validation
- Code Quality: Removed deprecated dependencies and cleaned up imports
- Eliminated unused mason_logger dependency
- Streamlined logging implementation
- Better separation of concerns in generator classes
1.0.5 - 2026-05-10 #
Added #
- π¨ Interactive Theme Selection:
petracore initnow prompts users to choose between Mix and Material themes when--themeis not explicitly passed--no-interactiveflag added for CI/scripting use
- π· Media Feature (
petracore feature media): Full Cloudinary-backed media feature auto-detected on the "media" keyword (like auth)- 36 template files: enums, extensions, parsers, models, DTOs, Cloudinary service, 3 repositories, 5 use cases, 5 widgets, 2 BLoCs (Upload + Download), helpers
- Interactive prompt: basic or complete media setup
- Dependencies auto-added:
image_picker,cloudinary_sdk,cloudinary,file_saver,share_plus,webview_flutter - BLoC provider auto-registered in shared
bloc_provider.dart
- π£οΈ Layered Navigation Architecture: Routes now follow a 5-layer pattern
- Route constants use the
Route(path:, name:)data class fromroute_model.dart - Per-feature route list files in
lib/navigation/routes/*_routes.dart - Incremental marker-based insertion (no more destructive regex replacement)
- Route constants use the
- π Feature Route Registration:
FeatureGeneratornow registers routes β creates route list file, addsRouteconstant toroutes.dart, and updatesrouter.dart
Fixed #
- π NDK Version: Updated from
27.3.13750724to27.0.12077973(latest fully installed). Regex also updated fromndkVersion\s*=\s*"[^"]*"tondkVersion\s*=\s*\S+to correctly matchndkVersion = flutter.ndkVersionformat - πΊοΈ Auth Route Addition: Replaced destructive regex replacement of entire
routes: [...]block with incremental insertion before marker comment β preserves existing routes from other generators or manual edits - πΊοΈ Auth Route Constants: Replaced destructive
AppRoutesclass body replacement with incrementalRouteconstant addition
Changed #
- β»οΈ
routes_template.dart: Now usesRoute(path:, name:)data class withAppRoutes._()private constructor and marker comment for additions - β»οΈ
router_template.dart: Now referencesAppRoutes.splash.path/AppRoutes.splash.nameconstants with marker comment for additions - π Updated Documentation: README.md and CHANGELOG.md updated for all v1.0.5 improvements
1.0.4 - 2026-05-09 #
Added #
- π¨ Material 3 Theme Support: Full Material Design 3 theme support alongside existing Mix theme
--theme materialflag for project initialization- Structured theme files:
theme.dartbarrelsmaterial_theme.dart - Theme type auto-detection in
ProjectConfigReader
- π± Material Auth Screens: 11 material variant auth screen/widget templates
- Login, Signup, Splash, Welcome, Get Started, Verify OTP
- Forgot Password, Forgot Password Verify, Reset Password
- Resend Code Display, Resend Code Text
- Uses
Theme.of(context)(no Mix$token/colors.*references) AuthTemplatesclass with theme-aware_isMaterialbranching
- π Material Core Components: Material variants for 6 core components
- IconFrame, PasswordField, SearchInputField, LoadingIndicator
- PasswordStrengthChecker, InfoDisplay
- π Automatic BLoC Provider Registration: Features auto-register their BLoC providers
_updateSharedBlocProvider()in bothFeatureGeneratorandAuthFlowGenerator- Appends feature BLoC provider import + spread entry to shared
bloc_provider.dart
- π£οΈ Automatic Route Registration: Auth screens auto-register in router
_updateRouterWithAuthRoutes()inserts GoRoute entries intorouter.dart_updateAppRoutes()inserts route name constants intoroutes.dartAppRoutesclass- Conditional routes matching enabled auth feature flags
- Idempotent regex-based replacement for re-runs
Fixed #
- ποΈ Removed Redundant Models Barrel: Eliminated duplicate
data/models/models.dartgeneration- Removed
models_barrel_template.dartandmodels_template.dart - Feature index (
feature_name_index.dart) already exports models directly - Dead code cleanup from
template_index.dartand generators
- Removed
- π Ambiguous Extension Members: Fixed duplicate
capitalize()andstringOrNull()methods- Removed
StringExtfromcontext_extensions_template.dart - Eliminated all
ambiguous_extension_member_accesserrors
- Removed
- π― Template Syntax Fixes: Various template corrections
- Added
AppConstantsimport tomaterial_theme_template.dart - Fixed
progressBarThemeβprogressIndicatorTheme - Added
List<BlocProvider>type annotation toauth_bloc_provider_template.dart - Conditional
package:mix/mix.dartexclusion incore_barrel_template.dartfor material theme dart fix --applyat end ofAuthFlowGenerator.generate()
- Added
- π Updated Documentation: README.md and CHANGELOG.md updated for all improvements
Changed #
- β»οΈ Refactored Generators: Both
FeatureGeneratorandAuthFlowGeneratornow read actual project config instead of hardcoded defaults - π§Ή Code Organization: Cleaner separation between feature-level and project-level concerns