Bladeren bron

Merge pull request #79 from CaiJingLong/rootNavigator

add rootNavigator param.
Caijinglong 5 jaren geleden
bovenliggende
commit
06d5142c0e
No account linked to committer's email address
2 gewijzigde bestanden met toevoegingen van 25 en 25 verwijderingen
  1. 7
    7
      lib/photo.dart
  2. 18
    18
      pubspec.lock

+ 7
- 7
lib/photo.dart Bestand weergeven

@@ -129,8 +129,8 @@ class PhotoPicker {
129 129
       var result = await showDialog(
130 130
         context: context,
131 131
         builder: (ctx) => NotPermissionDialog(
132
-              provider.getNotPermissionText(options),
133
-            ),
132
+          provider.getNotPermissionText(options),
133
+        ),
134 134
       );
135 135
       if (result == true) {
136 136
         PhotoManager.openSetting();
@@ -147,13 +147,13 @@ class PhotoPicker {
147 147
     I18nProvider provider,
148 148
     List<AssetPathEntity> photoList,
149 149
   ) async {
150
-    return Navigator.of(context).push(
150
+    return Navigator.of(context, rootNavigator: true).push(
151 151
       MaterialPageRoute(
152 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 Bestand weergeven

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