Migrating To GoRouter 2.0: A Case Study
Flutter app migrated from GetX & Navigation 1.0 to GoRouter 2.0, improving code org, performance, and dev experience with centralized routing, faster navigation, reduced memory usage, and easier debugging.
Introduction Recently, I led the migration of UpAlerts, a large-scale Flutter application, from a mixed routing system using Navigation 1.0 and GetX to GoRouter 2.0. This post details our journey, challenges, and solutions, hoping to help others undertaking similar migrations. Initial State Our codebase had: ~10,000 lines of code Mixed routing approaches: Navigation 1.0 for basic navigation GetX for complex routes Custom route handlers for deep links Complex navigation patterns: Nested navigation in tabs Dynamic routes based on user roles Deep linking support Authentication-dep...