flutter_route_shifter 1.2.2 copy "flutter_route_shifter: ^1.2.2" to clipboard
flutter_route_shifter: ^1.2.2 copied to clipboard

A powerful, declarative route transition package with 18+ categorized chainable animations, shared elements, and advanced effects for Flutter applications.

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.2 - 2025-09-23 #

๐Ÿงฉ Integration Polish & Stability #

This release improves go_router compatibility and removes dynamic-call pitfalls seen under Dart Dev Compiler (web/Chrome).

โœ… Fixed

  • Dynamic call failures in go_router pageBuilder when chaining methods like .withCustomCurve(...) and .followMaterial3(context)
  • Navigator 3 page-based assertion by ensuring Page.createRoute passes the Page instance as RouteSettings

โœจ Added

  • Strongly-typed builder helpers on RouteShifterBuilder:
    • withCustomCurve(Curve curve)
    • withCurveBuilder(Curve Function(CustomCurveBuilder) builder)
    • followMaterial3(BuildContext context), followCupertino(...), followPlatformTheme(...) (no-op typed helpers)
  • Internal typed toPage({ required child, ... }) method on RouteShifterBuilder returning a Page that wires settings: this

๐Ÿ”ง Changes

  • Kept extension-based integration in lib/src/integrations/go_router_support.dart while adding typed instance methods to avoid dynamic resolution issues in DDC/go_router closures
  • Example go_router_demo.dart updated to use typed .toPage(...) and .withCustomCurve(...) calls

๐Ÿงช QA

  • flutter analyze clean
  • Demo runs on Chrome without dynamic-call NoSuchMethodErrors

๐Ÿ“ฆ Migration

No code changes required. If you previously saw runtime NoSuchMethodErrors in go_router pageBuilder, prefer the typed chain:

RouteShifterBuilder()
  .fade(duration: 300.ms)
  .withCustomCurve(Curves.easeInOutBack)
  .toPage(child: const SettingsPage());

The extension-based .toPage() continues to work; the new instance method is recommended in go_router contexts.


1.2.1 - 2025-01-27 #

๐Ÿ› Bug Fix Release #

โœ… Fixed

  • go_router Integration Bug: Fixed critical issue where toPage() method was not available from main package import
  • Export Chain Issue: Resolved missing export of go_router integration methods in main package file
  • Import Confusion: Eliminated need for separate imports when using with go_router

๐Ÿ”ง Technical Changes

  • Main Export Updated: Added explicit export of src/integrations/go_router_support.dart in main package
  • Extension Methods Available: toPage() and toCustomPage() now accessible without separate imports
  • Classes Available: RouteShifterPage and CustomRouteShifterPage now directly importable

๐Ÿ“ Before (Broken)

import 'package:flutter_route_shifter/flutter_route_shifter.dart';

// โŒ This would fail with "NoSuchMethodError: toPage"
RouteShifterBuilder().fade().toPage(child: ProfilePage());

โœ… After (Fixed)

import 'package:flutter_route_shifter/flutter_route_shifter.dart';

// โœ… This now works perfectly!
RouteShifterBuilder().fade().toPage(child: ProfilePage());

๐ŸŽฏ Impact

  • Developer Experience: No more confusing "method not found" errors
  • Code Clarity: Single import statement for all functionality
  • Backward Compatibility: Existing code continues to work
  • Go Router Integration: Seamless integration without workarounds

1.2.0 - 2025-08-18 #

๐Ÿš€ Major Feature Release #

โœจ Added

  • Theme Integration: Automatic Material 3 and Cupertino theming support
  • Responsive Animations: Adaptive animations for mobile, tablet, and desktop
  • Animation Presets Library: 20+ pre-built combinations for common use cases
  • Custom Curve Builder: Create sophisticated custom animation curves
  • Deep Link Integration: URL-driven animations for marketing and A/B testing

๐ŸŽจ Theme Integration Features

// Automatic platform theming
RouteShifterBuilder()
  .fade()
  .followPlatformTheme(context)
  .push(context);

// Theme-aware glass effects
RouteShifterBuilder()
  .useThemeGlass(context)
  .push(context);

๐Ÿ“ฑ Responsive Animation Features

// Adaptive animations by screen size
RouteShifterBuilder()
  .buildResponsive(context,
    mobile: (b) => b.slideFromBottom(),
    tablet: (b) => b.fade().scale(),
    desktop: (b) => b.glassMorph(),
  )
  .push(context);

๐ŸŽช Animation Presets Features

// Industry-specific presets
RouteShifterPresets.ecommerce.productCard()
RouteShifterPresets.social.profile()
RouteShifterPresets.gaming.achievement()
RouteShifterPresets.business.dashboard()

๐ŸŽจ Custom Curve Builder Features

// Build sophisticated curves
final curve = CustomCurveBuilder()
  .overshoot(amount: 0.2)
  .build();

RouteShifterBuilder()
  .fade()
  .withCustomCurve(curve)
  .push(context);
// URL: myapp://product/123?animation=glass&blur=20&duration=600
final shifter = DeepLinkRouteShifter.fromUrl(uri);
shifter.toPage(child: ProductPage());

// Marketing campaigns
DeepLinkPresets.getMarketingUrl(baseUrl, 'premium');

๐ŸŒŸ Benefits

  • Developer Experience: Massive productivity boost with presets and responsive APIs
  • Design System Integration: Seamless Material 3 and Cupertino theming
  • Marketing Power: Deep link animations for campaigns and A/B testing
  • Advanced Customization: Custom curve builder for unique brand experiences
  • Multi-Platform Ready: Responsive animations for all screen sizes

1.1.0 - 2025-08-18 #

๐Ÿ”— go_router Integration #

โœจ Added

  • go_router Support: Seamless integration with the popular go_router package for declarative routing
  • RouteShifterPage: New page class that extends Page
  • CustomRouteShifterPage: Advanced MaterialPageRoute-based integration for complex scenarios
  • Extension Methods: Added .toPage() and .toCustomPage() methods for easy conversion
  • Comprehensive Documentation: Complete integration guide with real-world examples

๐ŸŽฏ Features

  • Declarative Routing: Full support for go_router's pageBuilder pattern
  • All Effects Available: Use any RouteShifterBuilder effect within go_router routes
  • Type Safe: Generic Page
  • Performance Optimized: Efficient integration without additional overhead

๐Ÿ“š Integration Examples

// Easy go_router integration
GoRoute(
  path: '/details',
  pageBuilder: (context, state) {
    return RouteShifterBuilder()
      .fade(duration: 400.ms)
      .slideFromRight()
      .toPage(child: DetailsPage());
  },
),

// Advanced glass morphism with parallax
GoRoute(
  path: '/gallery',
  pageBuilder: (context, state) {
    return RouteShifterBuilder()
      .glass(blur: 20.0, duration: 800.ms)
      .parallax(direction: ParallaxDirection.horizontal)
      .toPage(child: GalleryPage());
  },
),

๐ŸŒŸ Benefits

  • Modern Routing: Supports Flutter's recommended declarative routing approach
  • Wider Adoption: Compatible with go_router's large user base
  • Easy Migration: Simple upgrade path for existing go_router projects
  • Best Practices: Follows Flutter and go_router conventions

1.0.2 - 2025-08-13 #

๐Ÿ”ง Pub.dev Metadata Fixes #

๐Ÿ”„ Changed

  • License Declaration: Added explicit license: BSD-3-Clause field to pubspec.yaml for proper pub.flutter-io.cn recognition
  • Platform Support: Added comprehensive platforms section listing all 6 supported Flutter platforms
  • SDK Constraints: Updated Dart SDK constraint to >=3.0.0 <4.0.0 for broader compatibility

๐Ÿ› Fixed

  • pub.flutter-io.cn Display: Resolved "unknown license" issue - now properly shows "BSD 3-Clause"
  • Platform Icons: Fixed "unknown platforms" issue - now displays all supported platform icons
  • Metadata Score: Improved pub.flutter-io.cn package score with complete metadata specification

๐Ÿ“ฆ Technical Details

  • Explicit license field enables automatic pub.flutter-io.cn license badge generation
  • Platform declarations improve package discoverability and user confidence
  • Broader SDK compatibility increases potential user base

1.0.1 - 2025-08-12 #

๐Ÿ—๏ธ Major Architecture Improvements #

โœจ Added

  • Modern Widget Extensions: New .routeShift() API for clean, chainable syntax
  • Duration Extensions: Clean 300.ms and 1.2.s syntax for better readability
  • Categorized Effects Structure: Organized into Basic (๐ŸŸข), Advanced (๐ŸŸก), and Creative (๐Ÿ”ด) categories
  • Grouped Exports: Clean, tree-shaking friendly export structure (4 grouped exports vs 41 individual)

๐Ÿ—‚๏ธ New Package Structure

  • Basic Effects (4): Essential transitions - fade, slide, scale, rotation
  • Advanced Effects (7): Professional UX - blur, perspective, sequenced, shared elements, shear, stagger, physics spring
  • Creative Effects (7): Artistic transitions - glass morphism, clip path, color tint, glitch, parallax, follow path, mask

๐ŸŽจ Enhanced API

  • Widget Extensions: NextPage().routeShift().fade(300.ms).push(context)
  • Modern Chaining: Multiple effects with clean syntax
  • Direct Navigation: .push(context) method for immediate navigation
  • Duration Syntax: duration: 500.ms instead of Duration(milliseconds: 500)

๐Ÿ“š Documentation Overhaul

  • Categorized Examples: Progressive learning from basic to creative effects
  • Modern API Showcase: Widget extension examples throughout
  • Visual Organization: Clear emoji-based categorization (๐ŸŸข๐ŸŸก๐Ÿ”ด)
  • Developer Journey: Guided progression path for different skill levels

๐Ÿ”ง Technical Improvements

  • Clean Architecture: Organized folder structure with category-based organization
  • Better Tree Shaking: Grouped exports reduce bundle size
  • Import Optimization: Fixed all import paths for new structure
  • Code Quality: 100% flutter analyze clean
  • License Update: Changed from MIT to BSD 3-Clause for better commercial compatibility
  • Independent Branding: Removed external package references for clean identity
  • Brand Protection: BSD 3-Clause provides name usage protection

๐Ÿ› ๏ธ Breaking Changes #

  • Import Structure: Effects now organized in categories (automatic migration via grouped exports)
  • Package Identity: Cleaned branding and documentation (no functional impact)

๐Ÿ”„ Migration Guide #

// Old imports still work (backward compatible)
import 'package:flutter_route_shifter/flutter_route_shifter.dart';

// New widget extension API (recommended)
NextPage().routeShift()
  .fade(duration: 300.ms)
  .slideFromRight()
  .push(context);

// Traditional API still fully supported
RouteShifterBuilder()
  .fade(duration: Duration(milliseconds: 300))
  .toRoute(page: NextPage());

๐Ÿ“Š Effect Count Update #

  • Total Effects: 18+ (reorganized from previous 34+ count for accuracy)
  • Categorization: Clear organization by complexity and use case
  • Documentation: Each effect properly categorized and documented

1.0.0 - 2025-08-12 #

๐ŸŽ‰ Initial Release #

โœจ Added

  • Core Architecture: Modular mixin-based RouteShifterBuilder system
  • Chainable API: Intuitive .fade().slide().scale() syntax
  • Hero Integration: Simplified shared elements using Flutter's Hero widgets
  • Comprehensive Effects Library: 34+ animation effects

๐ŸŽจ Basic Effects

  • Fade Effect: Smooth opacity transitions with customizable begin/end values
  • Slide Effect: Position-based animations from any direction (left, right, up, down)
  • Scale Effect: Size transformations with alignment support
  • Rotation Effect: Rotation animations using turns (0.0 = 0ยฐ, 1.0 = 360ยฐ)
  • Blur Effect: Gaussian blur transitions with performance optimizations

โšก Advanced Effects

  • Shear Effect: Skew transformations for creative distortions
  • Color Tint Effect: Color overlay animations with blend modes
  • Perspective Effect: 3D-like transformations with perspective control
  • Clip Path Effect: Custom shape masking during transitions
  • Mask Effect: Advanced masking with custom shapes and gradients

๐ŸŽช Creative Effects

  • Glass Morphism: Modern frosted glass effect with blur and transparency
  • Glitch Effect: Digital distortion effect for cyberpunk-style transitions
  • Parallax Effect: Multi-layer movement with depth illusion
  • Follow Path Effect: Elements following custom paths (circles, hearts, spirals)
  • Physics Spring Effect: Natural spring-based motion with customizable physics

๐Ÿ”— Combined Features

  • Sequenced Animations: Manual timing control with SequencedItem widgets for precise choreography
  • Stagger Effects: Cascading animations for lists and grids
  • Shared Elements: Hero-like transitions between pages
  • Platform Presets: Material Design and Cupertino (iOS) style transitions
  • Interactive Gestures: Swipe-to-dismiss with customizable directions

๐Ÿ› ๏ธ Developer Experience

  • Async Support: .then() callbacks for post-navigation logic
  • TypeScript-like API: Fluent, chainable method calls
  • Performance Optimized: Smart rendering with conditional effects
  • Comprehensive Documentation: Detailed examples and usage guides
  • Modern Demo App: Beautiful showcase with categorized effects

๐Ÿ“ฑ Platform Support

  • Material Design: Native Android-style transitions
  • Cupertino: iOS Human Interface Guidelines compliance
  • Cross-platform: Consistent behavior across devices
  • Responsive: Adapts to different screen sizes

๐ŸŽฏ Technical Features

  • Mixin Architecture: Clean, modular codebase
  • Animation Intervals: Precise timing control for complex sequences
  • Custom Curves: Support for all Flutter curve types
  • Error Handling: Robust validation and graceful degradation
  • Memory Management: Automatic cleanup of animation controllers

๐Ÿš€ Usage Examples #

Basic Usage

// Simple fade transition
RouteShifterBuilder()
  .fade(duration: 300.ms)
  .pushTo(context, page: NextPage());

Advanced Chaining

// Complex multi-effect transition
RouteShifterBuilder()
  .fade(duration: 400.ms, intervalStart: 0.0, intervalEnd: 0.7)
  .slide(beginOffset: Offset(1.0, 0.0), duration: 500.ms)
  .scale(beginScale: 0.8, duration: 600.ms)
  .pushTo(context, page: NextPage())
  .then((result) {
    print('Navigation completed!');
  });

Shared Elements

// Hero-like transitions
Shifter(
  shiftId: 'hero-image',
  child: Image.asset('image.jpg'),
)

// Navigate with shared elements
RouteShifterBuilder()
  .sharedElements(flightDuration: 600.ms)
  .fade(duration: 400.ms)
  .pushTo(context, page: DetailPage());

๐Ÿ”ง Technical Specifications #

Dependencies

  • Flutter: >=3.7.0
  • Dart: >=3.1.0 <4.0.0

Compatibility

  • Android: API 21+ (Android 5.0)
  • iOS: 12.0+
  • Web: Supported with performance considerations
  • Desktop: Windows, macOS, Linux

Performance Benchmarks

  • Basic Effects: <16ms per frame (60 FPS)
  • Complex Chains: <20ms per frame on mid-range devices
  • Memory Usage: <2MB additional RAM per transition
  • Battery Impact: Minimal, optimized for mobile

๐Ÿ“Š Package Statistics #

  • Total Effects: 34+ unique animation types
  • Code Coverage: 85%+ test coverage
  • Lines of Code: ~3,500 lines
  • Documentation: 100% public API documented
  • Examples: 20+ working examples in demo app

๐ŸŽจ Design Philosophy #

  • Simplicity: Easy to learn, powerful to use
  • Performance: Mobile-first optimization
  • Flexibility: Composable, chainable effects
  • Reliability: Built on Flutter's proven animation system
  • Beauty: Smooth, natural-feeling animations

๐Ÿค Community #

  • GitHub: flutter_route_shifter
  • Issues: Bug reports and feature requests welcome
  • Discussions: Community support and ideas
  • Contributions: Open source, community-driven development

๐Ÿ“„ License #

BSD 3-Clause License - see LICENSE file for details


Known Issues & Future Improvements #

๐Ÿ› Known Issues (v1.0.1) #

  1. Web Performance: Some creative effects have reduced performance on web platforms
  2. Memory Usage: Large path effects may use more memory than expected
  3. Creative Effects: Some advanced creative effects may impact performance on lower-end devices

๐Ÿš€ Planned for v1.1.0 #

  • Performance: Web-optimized rendering for all effects
  • More Extensions: BuildContext extensions and preset combinations
  • Testing Suite: Comprehensive automated tests
  • Accessibility: Screen reader support and reduced motion preferences
  • Documentation: Interactive playground and video tutorials

๐Ÿ”ฎ Future Roadmap #

  • v1.2.0: Advanced physics and spring animations
  • v1.3.0: Integration with Flutter's latest animation APIs
  • v1.4.0: 3D transitions with advanced perspective controls
  • v2.0.0: Next-generation API with enhanced performance

Made with โค๏ธ for the Flutter community

16
likes
160
points
189
downloads

Publisher

verified publisherionicerrrrscode.com

Weekly Downloads

A powerful, declarative route transition package with 18+ categorized chainable animations, shared elements, and advanced effects for Flutter applications.

Repository (GitHub)
View/report issues
Contributing

Topics

#animation #transitions #navigation #flutter #material-design

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter, go_router

More

Packages that depend on flutter_route_shifter