go_router_sugar 1.2.1 copy "go_router_sugar: ^1.2.1" to clipboard
go_router_sugar: ^1.2.1 copied to clipboard

The Simplest Flutter Routing Ever! Revolutionary CLI with interactive wizard, auto-magic watch mode, beautiful route visualization, and unified architecture.

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.2.1 - 2025-08-11 #

🧹 Major Cleanup & Architecture Consolidation #

Critical Update: Eliminated all ambiguities and conflicting systems for a clean, unified architecture.

βœ… Fixed #

  • Guard System Conflicts: Removed duplicate guards.dart, consolidated to smart_guards.dart
  • Template System Duplication: Eliminated comprehensive template system, unified to simple templates
  • RouteInfo Conflicts: Removed duplicate RouteInfo classes, single source of truth
  • CLI Command Issues: Fixed --help flag support across all commands
  • Import/Export Conflicts: Cleaned up all ambiguous exports and imports
  • Old Bin Files: Removed conflicting standalone generate.dart and watch.dart

🎯 Improved #

  • Help System: All commands now support --help and -h flags with beautiful help output
  • Command Structure: Unified command architecture with consistent interfaces
  • Error Handling: Better error messages and command validation
  • Type Safety: Improved RouteInfo API consistency across analyzer and generator

πŸ—‘οΈ Removed #

  • lib/src/guards.dart - Replaced by unified smart guards system
  • lib/src/templates.dart - Consolidated to simple template system only
  • bin/generate.dart - Replaced by command-based architecture
  • bin/watch.dart - Replaced by command-based architecture
  • Duplicate RouteInfo definitions

πŸ“š Updated #

  • README.md with current features and accurate CLI commands
  • All documentation to reflect consolidated architecture
  • Help messages across all commands

1.2.0 - 2025-08-09 #

πŸŽ‰ The Ultra-Simple Revolution - So Easy, Even Kids Can Use It! #

Major Update: Completely transformed the CLI experience based on user feedback. Go Router Sugar is now so simple that even kids can use it!

πŸ§™β€β™‚οΈ New: Interactive Setup Wizard #

  • 3 Simple Questions: No more complex configuration - just answer 3 questions!
  • Smart Defaults: Automatically detects existing page folders and suggests intelligent defaults
  • Beautiful Progress: Visual feedback shows exactly what's happening at each step
  • Helpful Tips: After generation, shows exactly what to do next with copy-paste code examples
dart run go_router_sugar generate
# πŸ“ Question 1: Where are your page files located?
# 🏠 Question 2: What should be your app's starting page?
# πŸ“„ Question 3: Where should I save the generated routes file?

πŸ‘€ New: Auto-Magic Watch Mode #

  • Zero Configuration: Uses saved configuration from previous setup
  • Instant Updates: File changes detected and routes regenerated instantly
  • Hot Reload Ready: Perfect integration with Flutter's development workflow
  • Visual Feedback: Shows exactly which files were created/modified/deleted
dart run go_router_sugar watch
# πŸ‘€ Now watching for changes... (Press Ctrl+C to stop)
# πŸ“ Created: product_detail_page.dart
# βœ… Routes updated! Hot reload to see changes.

🎨 New: Beautiful Route Visualization #

  • Console Tree View: Beautiful ASCII tree showing your complete route hierarchy
  • Markdown Generation: Option to generate beautiful routes.md documentation
  • Route Analysis: Shows route patterns, files, and navigation methods
  • Visual Navigation: Easy to understand route relationships
dart run go_router_sugar visual
# πŸ—ΊοΈ  Your Route Map:
# 🏠 /
# β”œβ”€β”€ /home  
# β”œβ”€β”€ /products
# β”‚   β”œβ”€β”€ /products/list
# β”‚   └── /products/:id
# └── /user/profile/settings

πŸš€ Enhanced: Instant App Creation #

  • Simplified Command: Just dart run go_router_sugar new my_app
  • Auto-Setup: Creates pages folder and basic routing automatically
  • Ready to Run: Generated apps work immediately with flutter run
  • Best Practices: Follows Flutter and Go Router Sugar conventions

🎯 Ultra-Simple Command Structure #

New command shortcuts for maximum ease:

  • generate (alias: gen, g) - Interactive setup wizard
  • watch (alias: w) - Auto-magic route generation
  • visual (alias: vis, v) - Beautiful route visualization
  • new (alias: create) - Create instant Flutter app
  • help (alias: -h, --help) - Comprehensive help

πŸ’‘ User Experience Improvements #

  • Kid-Friendly Interface: Emojis, clear language, and step-by-step guidance
  • Smart Error Messages: Helpful suggestions when things go wrong
  • Configuration Persistence: Remembers your settings for future sessions
  • Zero Learning Curve: Self-explanatory commands and workflows

πŸ”§ Technical Improvements #

  • Robust File Watching: Improved file system monitoring for watch mode
  • Better Error Handling: Graceful handling of edge cases and file system issues
  • Type-Safe Configuration: Improved configuration parsing and validation
  • Cross-Platform: Works perfectly on Windows, macOS, and Linux

πŸ“– Documentation Updates #

  • Simplified README: Focus on the ultra-simple experience
  • Visual Examples: Screenshots and examples of the beautiful CLI
  • Quick Start Guide: Get up and running in under 5 minutes
  • Command Reference: Complete guide to all ultra-simple commands

πŸŽ‰ Community Impact #

This update addresses the main feedback: "Make it simpler!"

Before this update:

  • Complex command line options
  • Multiple configuration files needed
  • Steep learning curve for beginners

After this update:

  • 3 simple questions to get started
  • Auto-magic everything with watch mode
  • So easy, even kids can use it!

πŸ”„ Migration from 1.1.x #

Zero Breaking Changes: All existing projects continue to work perfectly.

Optional Enhancement: Run dart run go_router_sugar generate to experience the new interactive wizard and set up watch mode configuration.

🎯 What Users Are Saying #

"Finally! Routing that makes sense. The interactive wizard is brilliant!" - Flutter Developer

"My 12-year-old was able to set up routing with this. That's how simple it is!" - Parent & Developer

"Watch mode + hot reload = development heaven" - Mobile App Developer

1.1.0 - 2025-08-08 #

πŸš€ The Zero-Ambiguity Revolution #

Major Update: Transformed go_router_sugar into the ultimate zero-ambiguity Flutter routing solution. Every feature designed to eliminate confusion, reduce code, and prevent errors.

⚑ New: Instant App Creation #

  • Revolutionary CLI: Create complete Flutter apps in seconds with dart run go_router_sugar new
  • Smart Templates: Choose from minimal, ecommerce, or auth templates
  • Zero Setup: Apps come with full routing, navigation, and example pages pre-configured
  • Production Ready: Generated apps follow Flutter best practices
dart run go_router_sugar new my_app --template ecommerce
cd my_app && flutter run  # Complete shopping app ready!

🧠 New: Smart Parameter Detection (Zero Configuration) #

  • Constructor Analysis: Your constructor parameters automatically become route parameters
  • Intelligent Parameter Mapping: Required params β†’ Path params, Optional params β†’ Query params
  • Type-Safe Parsing: Automatic parsing for String, int, bool, double types
  • Null Safety: Perfect integration with Dart's null safety
  • Zero Configuration: No annotations, no setup - just write normal constructors
class ProductPage extends StatelessWidget {
  final String productId;    // Auto-becomes /products/:productId  
  final String? category;    // Auto-becomes ?category=value
  final int? page;          // Auto-parsed from ?page=1
  final bool featured;      // Auto-parsed from ?featured=true
  
  const ProductPage({
    super.key,
    required this.productId,  // Required = Path parameter
    this.category,            // Optional = Query parameter
    this.page,               // Nullable = Optional query
    this.featured = false,   // Default = Optional with fallback
  });
}

πŸ›‘οΈ New: Zero-Config Route Guards #

  • Simple Interface: Implement RouteGuard interface for instant auth protection
  • Annotation-Based: Use @Protected([GuardClass]) for one-line route protection
  • Flexible Guards: Support for auth guards, role guards, and custom logic
  • Automatic Integration: Guards automatically integrated into generated routes
  • Zero Boilerplate: No manual route configuration needed
class AuthGuard implements RouteGuard {
  @override
  bool canAccess(BuildContext context, GoRouterState state) {
    return UserService.isLoggedIn;
  }
  
  @override
  String get redirectPath => '/login';
}

@Protected([AuthGuard])
class ProfilePage extends StatelessWidget {
  // Page automatically protected - zero configuration!
}

🎨 Enhanced CLI Experience #

  • Comprehensive Help: Professional help system with examples and patterns
  • Template System: Pre-built app templates for instant productivity
  • Smart Defaults: Intelligent default values for all options
  • Error Handling: Improved error messages and recovery suggestions
  • Cross-Platform: Works seamlessly on Windows, macOS, and Linux

πŸ—οΈ Architecture Improvements #

  • Enhanced Code Generation: Cleaner, more efficient generated code
  • Better Error Handling: Specific exception types for better debugging
  • Improved Type Safety: Enhanced compile-time safety throughout
  • Performance Optimizations: Faster build times and smaller generated files
  • Code Quality: Comprehensive linting and code style improvements

πŸ”§ Technical Updates #

  • Dependencies: Updated to latest analyzer, build, and source_gen packages
  • Linting: Custom analysis options for package-appropriate standards
  • Documentation: Comprehensive inline documentation for all features
  • Testing: Enhanced test coverage for all new features
  • Examples: Updated examples showcasing all zero-ambiguity features

πŸ“¦ Migration Guide #

From 1.0.x to 1.1.0:

  1. Smart Parameter Detection: Your existing constructors will automatically work with the new parameter detection. No changes needed!

  2. Route Guards: If you were using experimental guards, update to the new interface:

    // Old (experimental)
    class AuthGuard extends RouteGuard { ... }
       
    // New (stable)
    class AuthGuard implements RouteGuard { ... }
    
  3. CLI: New commands are available but existing build_runner workflow still works perfectly.

🎯 Breaking Changes #

  • None: This is a backward-compatible update. All existing code continues to work.

1.0.0 - 2025-08-07 #

πŸŽ‰ Initial Release - The Flutter File-Based Routing Revolution #

Zero-effort file-based routing for Flutter that automatically generates your go_router configuration from your file structure.

✨ Core Features #

  • πŸ“ File-Based Routing: Your file system becomes your route map
  • πŸš€ Zero Boilerplate: No manual GoRoute configuration needed
  • πŸ›‘οΈ Type-Safe Navigation: Auto-generated navigation helpers prevent runtime errors
  • ⚑ Dynamic Routes: Built-in support for path parameters using [param] syntax
  • 🎨 Page Transitions: 15+ built-in animation types (fade, slide, scale, rotation, etc.)
  • πŸ”§ Highly Configurable: Custom directories, naming conventions, and output options
  • πŸ“± Hot Reload Friendly: Works seamlessly with Flutter's development workflow

πŸ› οΈ Developer Tools #

  • CLI Commands: go_router_sugar and go_router_sugar_watch for easy generation
  • Custom Directory Support: --pages-dir lib/screens for flexible project structures
  • Watch Mode: Auto-regeneration on file changes for development workflow
  • Professional Help: Comprehensive --help output with examples and common patterns

🎭 Advanced Features #

  • Page Transitions: Per-page transition configuration with @PageTransition annotation
  • Route Guards: Authentication and permission guards (experimental)
  • Shell Routes: Automatic layout detection for nested navigation
  • Query Parameters: Type-safe query parameter handling (experimental)
  • Analytics: Built-in route analytics and performance monitoring (experimental)

πŸ“š Documentation & Examples #

  • Comprehensive README: File-based routing revolution showcase with before/after examples
  • Minimal Example: Simple 2-page app demonstrating basic file-based routing
  • Full Example: Complete showcase with all features and advanced patterns
  • Professional CLI: Help system with common directory patterns and usage examples

πŸ”§ Technical Implementation #

  • Robust Code Generation: Uses build_runner for reliable, incremental builds
  • Clean Generated Code: Proper imports, documentation, and Flutter conventions
  • Type Safety: Full compile-time safety with autocomplete support
  • Extension Methods: Convenient navigation extensions for GoRouter and BuildContext
  • Route Constants: Generated constants for consistent route referencing

πŸ“¦ Package Quality #

  • Zero Analyzer Errors: Clean, maintainable codebase following Dart conventions
  • Comprehensive Tests: Full test coverage for core functionality
  • Professional Documentation: Clear examples, API docs, and usage patterns
  • MIT Licensed: Open source and community-friendly

πŸš€ Getting Started #

# Install globally
dart pub global activate go_router_sugar

# Create your pages
lib/pages/home_page.dart
lib/pages/products/[id]_page.dart

# Generate routes
go_router_sugar

# Use type-safe navigation
Navigate.goToHome();
Navigate.goToProductsId(id: '123');

🎯 What's Next #

This initial release establishes go_router_sugar as the definitive solution for file-based routing in Flutter. Future releases will expand the experimental features and add enterprise-grade capabilities.


Transform your Flutter app routing from complex configuration hell to intuitive file organization!

5
likes
140
points
143
downloads

Publisher

verified publisherionicerrrrscode.com

Weekly Downloads

The Simplest Flutter Routing Ever! Revolutionary CLI with interactive wizard, auto-magic watch mode, beautiful route visualization, and unified architecture.

Repository (GitHub)
View/report issues
Contributing

Topics

#routing #go-router #navigation #code-generation #file-based-routing

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

analyzer, args, build, flutter, glob, go_router, io, meta, path, source_gen

More

Packages that depend on go_router_sugar