Browse Source

add rootNavigator param.

Caijinglong 5 years ago
parent
commit
c01e17a4d4
2 changed files with 25 additions and 25 deletions
  1. 7
    7
      lib/photo.dart
  2. 18
    18
      pubspec.lock

+ 7
- 7
lib/photo.dart View File

129
       var result = await showDialog(
129
       var result = await showDialog(
130
         context: context,
130
         context: context,
131
         builder: (ctx) => NotPermissionDialog(
131
         builder: (ctx) => NotPermissionDialog(
132
-              provider.getNotPermissionText(options),
133
-            ),
132
+          provider.getNotPermissionText(options),
133
+        ),
134
       );
134
       );
135
       if (result == true) {
135
       if (result == true) {
136
         PhotoManager.openSetting();
136
         PhotoManager.openSetting();
147
     I18nProvider provider,
147
     I18nProvider provider,
148
     List<AssetPathEntity> photoList,
148
     List<AssetPathEntity> photoList,
149
   ) async {
149
   ) async {
150
-    return Navigator.of(context).push(
150
+    return Navigator.of(context, rootNavigator: true).push(
151
       MaterialPageRoute(
151
       MaterialPageRoute(
152
         builder: (ctx) => PhotoApp(
152
         builder: (ctx) => PhotoApp(
153
-              options: options,
154
-              provider: provider,
155
-              photoList: photoList,
156
-            ),
153
+          options: options,
154
+          provider: provider,
155
+          photoList: photoList,
156
+        ),
157
       ),
157
       ),
158
     );
158
     );
159
   }
159
   }

+ 18
- 18
pubspec.lock View File

5
     dependency: transitive
5
     dependency: transitive
6
     description:
6
     description:
7
       name: async
7
       name: async
8
-      url: "https://pub.dartlang.org"
8
+      url: "https://pub.flutter-io.cn"
9
     source: hosted
9
     source: hosted
10
     version: "2.3.0"
10
     version: "2.3.0"
11
   boolean_selector:
11
   boolean_selector:
12
     dependency: transitive
12
     dependency: transitive
13
     description:
13
     description:
14
       name: boolean_selector
14
       name: boolean_selector
15
-      url: "https://pub.dartlang.org"
15
+      url: "https://pub.flutter-io.cn"
16
     source: hosted
16
     source: hosted
17
     version: "1.0.5"
17
     version: "1.0.5"
18
   charcode:
18
   charcode:
19
     dependency: transitive
19
     dependency: transitive
20
     description:
20
     description:
21
       name: charcode
21
       name: charcode
22
-      url: "https://pub.dartlang.org"
22
+      url: "https://pub.flutter-io.cn"
23
     source: hosted
23
     source: hosted
24
     version: "1.1.2"
24
     version: "1.1.2"
25
   collection:
25
   collection:
26
     dependency: transitive
26
     dependency: transitive
27
     description:
27
     description:
28
       name: collection
28
       name: collection
29
-      url: "https://pub.dartlang.org"
29
+      url: "https://pub.flutter-io.cn"
30
     source: hosted
30
     source: hosted
31
     version: "1.14.11"
31
     version: "1.14.11"
32
   flutter:
32
   flutter:
43
     dependency: transitive
43
     dependency: transitive
44
     description:
44
     description:
45
       name: matcher
45
       name: matcher
46
-      url: "https://pub.dartlang.org"
46
+      url: "https://pub.flutter-io.cn"
47
     source: hosted
47
     source: hosted
48
     version: "0.12.5"
48
     version: "0.12.5"
49
   meta:
49
   meta:
50
     dependency: transitive
50
     dependency: transitive
51
     description:
51
     description:
52
       name: meta
52
       name: meta
53
-      url: "https://pub.dartlang.org"
53
+      url: "https://pub.flutter-io.cn"
54
     source: hosted
54
     source: hosted
55
     version: "1.1.7"
55
     version: "1.1.7"
56
   path:
56
   path:
57
     dependency: transitive
57
     dependency: transitive
58
     description:
58
     description:
59
       name: path
59
       name: path
60
-      url: "https://pub.dartlang.org"
60
+      url: "https://pub.flutter-io.cn"
61
     source: hosted
61
     source: hosted
62
     version: "1.6.4"
62
     version: "1.6.4"
63
   pedantic:
63
   pedantic:
64
     dependency: transitive
64
     dependency: transitive
65
     description:
65
     description:
66
       name: pedantic
66
       name: pedantic
67
-      url: "https://pub.dartlang.org"
67
+      url: "https://pub.flutter-io.cn"
68
     source: hosted
68
     source: hosted
69
     version: "1.8.0+1"
69
     version: "1.8.0+1"
70
   photo_manager:
70
   photo_manager:
71
     dependency: "direct main"
71
     dependency: "direct main"
72
     description:
72
     description:
73
       name: photo_manager
73
       name: photo_manager
74
-      url: "https://pub.dartlang.org"
74
+      url: "https://pub.flutter-io.cn"
75
     source: hosted
75
     source: hosted
76
     version: "0.4.4"
76
     version: "0.4.4"
77
   quiver:
77
   quiver:
78
     dependency: transitive
78
     dependency: transitive
79
     description:
79
     description:
80
       name: quiver
80
       name: quiver
81
-      url: "https://pub.dartlang.org"
81
+      url: "https://pub.flutter-io.cn"
82
     source: hosted
82
     source: hosted
83
     version: "2.0.5"
83
     version: "2.0.5"
84
   sky_engine:
84
   sky_engine:
90
     dependency: transitive
90
     dependency: transitive
91
     description:
91
     description:
92
       name: source_span
92
       name: source_span
93
-      url: "https://pub.dartlang.org"
93
+      url: "https://pub.flutter-io.cn"
94
     source: hosted
94
     source: hosted
95
     version: "1.5.5"
95
     version: "1.5.5"
96
   stack_trace:
96
   stack_trace:
97
     dependency: transitive
97
     dependency: transitive
98
     description:
98
     description:
99
       name: stack_trace
99
       name: stack_trace
100
-      url: "https://pub.dartlang.org"
100
+      url: "https://pub.flutter-io.cn"
101
     source: hosted
101
     source: hosted
102
     version: "1.9.3"
102
     version: "1.9.3"
103
   stream_channel:
103
   stream_channel:
104
     dependency: transitive
104
     dependency: transitive
105
     description:
105
     description:
106
       name: stream_channel
106
       name: stream_channel
107
-      url: "https://pub.dartlang.org"
107
+      url: "https://pub.flutter-io.cn"
108
     source: hosted
108
     source: hosted
109
     version: "2.0.0"
109
     version: "2.0.0"
110
   string_scanner:
110
   string_scanner:
111
     dependency: transitive
111
     dependency: transitive
112
     description:
112
     description:
113
       name: string_scanner
113
       name: string_scanner
114
-      url: "https://pub.dartlang.org"
114
+      url: "https://pub.flutter-io.cn"
115
     source: hosted
115
     source: hosted
116
     version: "1.0.5"
116
     version: "1.0.5"
117
   term_glyph:
117
   term_glyph:
118
     dependency: transitive
118
     dependency: transitive
119
     description:
119
     description:
120
       name: term_glyph
120
       name: term_glyph
121
-      url: "https://pub.dartlang.org"
121
+      url: "https://pub.flutter-io.cn"
122
     source: hosted
122
     source: hosted
123
     version: "1.1.0"
123
     version: "1.1.0"
124
   test_api:
124
   test_api:
125
     dependency: transitive
125
     dependency: transitive
126
     description:
126
     description:
127
       name: test_api
127
       name: test_api
128
-      url: "https://pub.dartlang.org"
128
+      url: "https://pub.flutter-io.cn"
129
     source: hosted
129
     source: hosted
130
     version: "0.2.5"
130
     version: "0.2.5"
131
   typed_data:
131
   typed_data:
132
     dependency: transitive
132
     dependency: transitive
133
     description:
133
     description:
134
       name: typed_data
134
       name: typed_data
135
-      url: "https://pub.dartlang.org"
135
+      url: "https://pub.flutter-io.cn"
136
     source: hosted
136
     source: hosted
137
     version: "1.1.6"
137
     version: "1.1.6"
138
   vector_math:
138
   vector_math:
139
     dependency: transitive
139
     dependency: transitive
140
     description:
140
     description:
141
       name: vector_math
141
       name: vector_math
142
-      url: "https://pub.dartlang.org"
142
+      url: "https://pub.flutter-io.cn"
143
     source: hosted
143
     source: hosted
144
     version: "2.0.8"
144
     version: "2.0.8"
145
 sdks:
145
 sdks: