@@ -17,7 +17,20 @@ import '../trasnaction_details/transaction_details_screen.dart';
1717
1818part 'routes.g.dart' ;
1919
20- @TypedGoRoute < OnBoardingRoute > (path: '/' )
20+ abstract class RoutePaths {
21+ static const String onBoarding = '/' ;
22+ static const String login = '/login' ;
23+ static const String main = '/main' ;
24+ static const String createAccount = '/createAccount' ;
25+ static const String statistics = '/statistics' ;
26+ static const String transactionDetails = '/transaction_details' ;
27+ static const String forgetPassword = '/forget_password' ;
28+ static const String updatePassword = '/update_password' ;
29+ static const String addIncome = '/add-income' ;
30+ static const String addExpense = '/add-expense' ;
31+ }
32+
33+ @TypedGoRoute < OnBoardingRoute > (path: RoutePaths .onBoarding)
2134@immutable
2235class OnBoardingRoute extends GoRouteData with $OnBoardingRoute {
2336 const OnBoardingRoute ();
@@ -38,7 +51,7 @@ class OnBoardingRoute extends GoRouteData with $OnBoardingRoute {
3851 }
3952}
4053
41- @TypedGoRoute < LoginRoute > (path: '/ login' )
54+ @TypedGoRoute < LoginRoute > (path: RoutePaths . login)
4255@immutable
4356class LoginRoute extends GoRouteData with $LoginRoute {
4457 const LoginRoute ();
@@ -52,7 +65,7 @@ class LoginRoute extends GoRouteData with $LoginRoute {
5265 }
5366}
5467
55- @TypedGoRoute < MainRoute > (path: '/ main' )
68+ @TypedGoRoute < MainRoute > (path: RoutePaths . main)
5669@immutable
5770class MainRoute extends GoRouteData with $MainRoute {
5871 const MainRoute ();
@@ -63,7 +76,7 @@ class MainRoute extends GoRouteData with $MainRoute {
6376 }
6477}
6578
66- @TypedGoRoute < CreateAccountRoute > (path: '/ createAccount' )
79+ @TypedGoRoute < CreateAccountRoute > (path: RoutePaths . createAccount)
6780@immutable
6881class CreateAccountRoute extends GoRouteData
6982 with $CreateAccountRoute {
@@ -75,7 +88,7 @@ class CreateAccountRoute extends GoRouteData
7588 }
7689}
7790
78- @TypedGoRoute < StatisticsRoute > (path: '/ statistics' )
91+ @TypedGoRoute < StatisticsRoute > (path: RoutePaths . statistics)
7992@immutable
8093class StatisticsRoute extends GoRouteData
8194 with $StatisticsRoute {
@@ -90,7 +103,7 @@ class StatisticsRoute extends GoRouteData
90103 }
91104}
92105
93- @TypedGoRoute < TransactionDetailsRoute > (path: '/transaction_details' )
106+ @TypedGoRoute < TransactionDetailsRoute > (path: RoutePaths .transactionDetails )
94107@immutable
95108class TransactionDetailsRoute extends GoRouteData with $TransactionDetailsRoute {
96109 final String transactionId;
@@ -102,7 +115,7 @@ class TransactionDetailsRoute extends GoRouteData with $TransactionDetailsRoute
102115 }
103116}
104117
105- @TypedGoRoute < ForgetPasswordRoute > (path: '/forget_password' )
118+ @TypedGoRoute < ForgetPasswordRoute > (path: RoutePaths .forgetPassword )
106119@immutable
107120class ForgetPasswordRoute extends GoRouteData with $ForgetPasswordRoute {
108121 const ForgetPasswordRoute ();
@@ -113,7 +126,7 @@ class ForgetPasswordRoute extends GoRouteData with $ForgetPasswordRoute {
113126 }
114127}
115128
116- @TypedGoRoute < UpdatePasswordRoute > (path: '/update_password' )
129+ @TypedGoRoute < UpdatePasswordRoute > (path: RoutePaths .updatePassword )
117130@immutable
118131class UpdatePasswordRoute extends GoRouteData with $UpdatePasswordRoute {
119132 @override
@@ -122,7 +135,7 @@ class UpdatePasswordRoute extends GoRouteData with $UpdatePasswordRoute {
122135 }
123136}
124137
125- @TypedGoRoute < AddIncomeRoute > (path: '/add-income' )
138+ @TypedGoRoute < AddIncomeRoute > (path: RoutePaths .addIncome )
126139@immutable
127140class AddIncomeRoute extends GoRouteData with $AddIncomeRoute {
128141 const AddIncomeRoute ();
@@ -133,7 +146,7 @@ class AddIncomeRoute extends GoRouteData with $AddIncomeRoute {
133146 }
134147}
135148
136- @TypedGoRoute < AddExpenseRoute > (path: '/add-expense' )
149+ @TypedGoRoute < AddExpenseRoute > (path: RoutePaths .addExpense )
137150@immutable
138151class AddExpenseRoute extends GoRouteData with $AddExpenseRoute {
139152 const AddExpenseRoute ();
0 commit comments