@@ -18,6 +18,7 @@ import 'package:ht_dashboard/dashboard/view/dashboard_page.dart';
18
18
import 'package:ht_dashboard/l10n/l10n.dart' ;
19
19
import 'package:ht_dashboard/router/routes.dart' ;
20
20
import 'package:ht_dashboard/settings/view/settings_page.dart' ;
21
+ import 'package:ht_dashboard/shared/widgets/placeholder_create_page.dart' ;
21
22
22
23
/// Creates and configures the GoRouter instance for the application.
23
24
///
@@ -165,16 +166,66 @@ GoRouter createRouter({
165
166
path: Routes .headlines,
166
167
name: Routes .headlinesName,
167
168
builder: (context, state) => const HeadlinesPage (),
169
+ routes: [
170
+ GoRoute (
171
+ path: Routes .createHeadline,
172
+ name: Routes .createHeadlineName,
173
+ builder: (context, state) =>
174
+ const PlaceholderCreatePage (
175
+ title: 'Create New Headline' ,
176
+ ), // Placeholder
177
+ ),
178
+ ],
168
179
),
169
180
GoRoute (
170
181
path: Routes .categories,
171
182
name: Routes .categoriesName,
172
183
builder: (context, state) => const CategoriesPage (),
184
+ routes: [
185
+ GoRoute (
186
+ path: Routes .createCategory,
187
+ name: Routes .createCategoryName,
188
+ builder: (context, state) =>
189
+ const PlaceholderCreatePage (
190
+ title: 'Create New Category' ,
191
+ ), // Placeholder
192
+ ),
193
+ GoRoute (
194
+ path: Routes .editCategory,
195
+ name: Routes .editCategoryName,
196
+ builder: (context, state) {
197
+ final id = state.pathParameters['id' ]! ;
198
+ return PlaceholderCreatePage (
199
+ title: 'Edit Category $id ' ,
200
+ ); // Placeholder
201
+ },
202
+ ),
203
+ ],
173
204
),
174
205
GoRoute (
175
206
path: Routes .sources,
176
207
name: Routes .sourcesName,
177
208
builder: (context, state) => const SourcesPage (),
209
+ routes: [
210
+ GoRoute (
211
+ path: Routes .createSource,
212
+ name: Routes .createSourceName,
213
+ builder: (context, state) =>
214
+ const PlaceholderCreatePage (
215
+ title: 'Create New Source' ,
216
+ ), // Placeholder
217
+ ),
218
+ GoRoute (
219
+ path: Routes .editSource,
220
+ name: Routes .editSourceName,
221
+ builder: (context, state) {
222
+ final id = state.pathParameters['id' ]! ;
223
+ return PlaceholderCreatePage (
224
+ title: 'Edit Source $id ' ,
225
+ ); // Placeholder
226
+ },
227
+ ),
228
+ ],
178
229
),
179
230
],
180
231
),
0 commit comments