File tree Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,16 @@ class _MineState extends State<Mine> {
110
110
),
111
111
),
112
112
),
113
+ TextButton (
114
+ onPressed: () => Navigator .of (context).pushNamed (NavigationPositioning .routeName),
115
+ child: Text (
116
+ '拖动排图' ,
117
+ style: TextStyle (
118
+ color: isDark ? Colors .white : Colors .black,
119
+ fontSize: 16.0 ,
120
+ ),
121
+ ),
122
+ ),
113
123
],
114
124
);
115
125
},
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class _ScrollNavigationPositioningState extends State<NavigationPositioning> {
58
58
});
59
59
}
60
60
61
- handleTabChange () {
61
+ void handleTabChange () {
62
62
late RenderBox box;
63
63
64
64
for (var i = 0 ; i < keyList.length; i++ ) {
@@ -77,7 +77,7 @@ class _ScrollNavigationPositioningState extends State<NavigationPositioning> {
77
77
}
78
78
}
79
79
80
- handleScroll (int index) async {
80
+ void handleScroll (int index) async {
81
81
_controller.removeListener (() => _debounce.run (handleTabChange));
82
82
final _context = keyList[index].currentContext;
83
83
if (_context == null ) {
@@ -96,6 +96,7 @@ class _ScrollNavigationPositioningState extends State<NavigationPositioning> {
96
96
97
97
return CupertinoPageScaffold (
98
98
navigationBar: const CupertinoNavigationBar (
99
+ transitionBetweenRoutes: false ,
99
100
middle: Text ('滑动定位' ),
100
101
),
101
102
child: Material (
Original file line number Diff line number Diff line change 1
1
// import 'package:dynamic_theme/helpers/route.dart';
2
+ import 'package:dynamic_theme/widgets/transition_builder.dart' ;
2
3
import 'package:flutter/material.dart' ;
3
4
4
5
final ThemeData lightTheme = _buildLightTheme ();
@@ -16,7 +17,7 @@ ThemeData _buildDarkTheme() {
16
17
final colorScheme = const ColorScheme .dark ().copyWith (primary: primaryColor, secondary: secondaryColor);
17
18
final base = ThemeData (
18
19
pageTransitionsTheme: const PageTransitionsTheme (builders: {
19
- // TargetPlatform.iOS: NoShadowCupertinoPageTransitionsBuilder(),
20
+ TargetPlatform .iOS: NoShadowCupertinoPageTransitionsBuilder (),
20
21
}),
21
22
brightness: Brightness .dark,
22
23
primaryColor: primaryColor,
@@ -49,7 +50,7 @@ ThemeData _buildLightTheme() {
49
50
final colorScheme = const ColorScheme .light ().copyWith (primary: primaryColor, secondary: secondaryColor);
50
51
final base = ThemeData (
51
52
pageTransitionsTheme: const PageTransitionsTheme (builders: {
52
- // TargetPlatform.iOS: NoShadowCupertinoPageTransitionsBuilder(),
53
+ TargetPlatform .iOS: NoShadowCupertinoPageTransitionsBuilder (),
53
54
}),
54
55
brightness: Brightness .light,
55
56
primaryColor: primaryColor,
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ List<RouterUnit> _buildRouter() {
33
33
routeName: NavigationPositioning .routeName,
34
34
buildRoute: (BuildContext context) => const NavigationPositioning (),
35
35
),
36
+ RouterUnit (
37
+ title: '拖动排图' ,
38
+ routeName: NavigationPositioning .routeName,
39
+ buildRoute: (BuildContext context) => const NavigationPositioning (),
40
+ ),
36
41
];
37
42
return routerList;
38
43
}
You can’t perform that action at this time.
0 commit comments