@@ -21,6 +21,7 @@ import 'package:gsy_github_app_flutter/page/release/release_page.dart';
2121import 'package:gsy_github_app_flutter/page/repos/repository_detail_page.dart' ;
2222import 'package:gsy_github_app_flutter/page/search/search_page.dart' ;
2323import 'package:gsy_github_app_flutter/page/user_profile_page.dart' ;
24+ import 'package:gsy_github_app_flutter/widget/never_overscroll_indicator.dart' ;
2425
2526/**
2627 * 导航栏
@@ -105,7 +106,10 @@ class NavigatorUtils {
105106 return Align (
106107 child: SizeTransition (
107108 sizeFactor: animation.drive (tween),
108- child: child,
109+ child: NeverOverScrollIndicator (
110+ needOverload: false ,
111+ child: child,
112+ ),
109113 ),
110114 );
111115 },
@@ -114,8 +118,31 @@ class NavigatorUtils {
114118
115119 ///荣耀列表
116120 static Future goHonorListPage (BuildContext context, List ? list) {
117- return Navigator .push (context,
118- new SizeRoute (widget: pageContainer (HonorListPage (list), context)));
121+ return Navigator .push (
122+ context,
123+ PageRouteBuilder (
124+ pageBuilder: (context, animation, secondaryAnimation) =>
125+ HonorListPage (list),
126+ transitionsBuilder: (context, animation, secondaryAnimation, child) {
127+ double begin = 0 ;
128+ double end = 1 ;
129+ var curve = Curves .ease;
130+
131+ var tween =
132+ Tween (begin: begin, end: end).chain (CurveTween (curve: curve));
133+
134+ return Align (
135+ child: SizeTransition (
136+ sizeFactor: animation.drive (tween),
137+ child: NeverOverScrollIndicator (
138+ needOverload: false ,
139+ child: child,
140+ ),
141+ ),
142+ );
143+ },
144+ ),
145+ );
119146 }
120147
121148 ///仓库版本列表
@@ -281,7 +308,10 @@ class NavigatorUtils {
281308
282309 ///不受系统字体缩放影响
283310 data: MediaQuery .of (context).copyWith (textScaleFactor: 1 ),
284- child: widget);
311+ child: NeverOverScrollIndicator (
312+ needOverload: false ,
313+ child: widget,
314+ ));
285315 }
286316
287317 ///弹出 dialog
@@ -299,7 +329,10 @@ class NavigatorUtils {
299329 ///不受系统字体缩放影响
300330 data: MediaQueryData .fromWindow (WidgetsBinding .instance! .window)
301331 .copyWith (textScaleFactor: 1 ),
302- child: new SafeArea (child: builder !(context)));
332+ child: NeverOverScrollIndicator (
333+ needOverload: false ,
334+ child: new SafeArea (child: builder !(context)),
335+ ));
303336 });
304337 }
305338}
0 commit comments