File tree Expand file tree Collapse file tree 3 files changed +18
-21
lines changed
lib/account/view/manage_followed_items Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import 'package:core/core.dart';
22import 'package:flutter/material.dart' ;
33import 'package:flutter_bloc/flutter_bloc.dart' ;
44import 'package:flutter_news_app_mobile_client_full_source_code/account/bloc/account_bloc.dart' ;
5- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
65import 'package:flutter_news_app_mobile_client_full_source_code/l10n/l10n.dart' ;
76import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
87import 'package:go_router/go_router.dart' ;
@@ -97,12 +96,12 @@ class FollowedCountriesListPage extends StatelessWidget {
9796 },
9897 ),
9998 onTap: () {
100- context.push (
101- Routes .countryDetails ,
102- extra : EntityDetailsPageArguments (
103- entityId : country.id,
104- contentType : ContentType . country,
105- ) ,
99+ context.pushNamed (
100+ Routes .entityDetailsName ,
101+ pathParameters : {
102+ 'type' : ContentType . country.name, // 'topic'
103+ 'id' : country.id ,
104+ } ,
106105 );
107106 },
108107 );
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import 'package:core/core.dart';
22import 'package:flutter/material.dart' ;
33import 'package:flutter_bloc/flutter_bloc.dart' ;
44import 'package:flutter_news_app_mobile_client_full_source_code/account/bloc/account_bloc.dart' ;
5- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
65import 'package:flutter_news_app_mobile_client_full_source_code/l10n/l10n.dart' ;
76import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
87import 'package:go_router/go_router.dart' ;
@@ -94,12 +93,12 @@ class FollowedSourcesListPage extends StatelessWidget {
9493 },
9594 ),
9695 onTap: () {
97- context.push (
98- Routes .sourceDetails ,
99- extra : EntityDetailsPageArguments (
100- entityId : source.id ,
101- contentType : ContentType . source,
102- ) ,
96+ context.pushNamed (
97+ Routes .entityDetailsName ,
98+ pathParameters : {
99+ 'type' : ContentType . source.name ,
100+ 'id' : source.id ,
101+ } ,
103102 );
104103 },
105104 );
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import 'package:core/core.dart';
22import 'package:flutter/material.dart' ;
33import 'package:flutter_bloc/flutter_bloc.dart' ;
44import 'package:flutter_news_app_mobile_client_full_source_code/account/bloc/account_bloc.dart' ;
5- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
65import 'package:flutter_news_app_mobile_client_full_source_code/l10n/l10n.dart' ;
76import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
87import 'package:go_router/go_router.dart' ;
@@ -102,12 +101,12 @@ class FollowedTopicsListPage extends StatelessWidget {
102101 },
103102 ),
104103 onTap: () {
105- context.push (
106- Routes .topicDetails ,
107- extra : EntityDetailsPageArguments (
108- entityId : topic.id ,
109- contentType : ContentType . topic,
110- ) ,
104+ context.pushNamed (
105+ Routes .entityDetailsName ,
106+ pathParameters : {
107+ 'type' : ContentType . topic.name ,
108+ 'id' : topic.id ,
109+ } ,
111110 );
112111 },
113112 );
You can’t perform that action at this time.
0 commit comments