File tree Expand file tree Collapse file tree 4 files changed +12
-28
lines changed
lib/headlines-search/widgets Expand file tree Collapse file tree 4 files changed +12
-28
lines changed Original file line number Diff line number Diff line change 11import 'package:core/core.dart' ;
22import 'package:flutter/material.dart' ;
3- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
43import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
54import 'package:go_router/go_router.dart' ;
65
@@ -22,12 +21,9 @@ class TopicItemWidget extends StatelessWidget {
2221 )
2322 : null ,
2423 onTap: () {
25- context.push (
26- Routes .topicDetails,
27- extra: EntityDetailsPageArguments (
28- entityId: topic.id,
29- contentType: ContentType .topic,
30- ),
24+ context.pushNamed (
25+ Routes .entityDetailsName,
26+ pathParameters: {'type' : ContentType .topic.name, 'id' : topic.id},
3127 );
3228 },
3329 );
Original file line number Diff line number Diff line change 11import 'package:core/core.dart' ;
22import 'package:flutter/material.dart' ;
3- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
43import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
54import 'package:go_router/go_router.dart' ;
65
@@ -21,12 +20,9 @@ class CountryItemWidget extends StatelessWidget {
2120 ? Text (country.isoCode, maxLines: 1 , overflow: TextOverflow .ellipsis)
2221 : null ,
2322 onTap: () {
24- context.push (
25- Routes .countryDetails,
26- extra: EntityDetailsPageArguments (
27- entityId: country.id,
28- contentType: ContentType .country,
29- ),
23+ context.pushNamed (
24+ Routes .entityDetailsName,
25+ pathParameters: {'type' : ContentType .country.name, 'id' : country.id},
3026 );
3127 },
3228 );
Original file line number Diff line number Diff line change 11import 'package:core/core.dart' ;
22import 'package:flutter/material.dart' ;
3- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
43import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
54import 'package:go_router/go_router.dart' ;
65
@@ -22,12 +21,9 @@ class SourceItemWidget extends StatelessWidget {
2221 )
2322 : null ,
2423 onTap: () {
25- context.push (
26- Routes .sourceDetails,
27- extra: EntityDetailsPageArguments (
28- entityId: source.id,
29- contentType: ContentType .source,
30- ),
24+ context.pushNamed (
25+ Routes .entityDetailsName,
26+ pathParameters: {'type' : ContentType .source.name, 'id' : source.id},
3127 );
3228 },
3329 );
Original file line number Diff line number Diff line change 11import 'package:core/core.dart' ;
22import 'package:flutter/material.dart' ;
3- import 'package:flutter_news_app_mobile_client_full_source_code/entity_details/view/entity_details_page.dart' ;
43import 'package:flutter_news_app_mobile_client_full_source_code/router/routes.dart' ;
54import 'package:go_router/go_router.dart' ;
65
@@ -22,12 +21,9 @@ class TopicItemWidget extends StatelessWidget {
2221 )
2322 : null ,
2423 onTap: () {
25- context.push (
26- Routes .topicDetails,
27- extra: EntityDetailsPageArguments (
28- entityId: topic.id,
29- contentType: ContentType .topic,
30- ),
24+ context.pushNamed (
25+ Routes .entityDetailsName,
26+ pathParameters: {'type' : ContentType .topic.name, 'id' : topic.id},
3127 );
3228 },
3329 );
You can’t perform that action at this time.
0 commit comments