Committed by
GitHub
Merge pull request #43 from bierbaumtim/master
Bugfixes
Showing
5 changed files
with
12 additions
and
358 deletions
example/pubspec.lock
deleted
100644 → 0
| 1 | -# Generated by pub | ||
| 2 | -# See https://dart.dev/tools/pub/glossary#lockfile | ||
| 3 | -packages: | ||
| 4 | - async: | ||
| 5 | - dependency: transitive | ||
| 6 | - description: | ||
| 7 | - name: async | ||
| 8 | - url: "https://pub.dartlang.org" | ||
| 9 | - source: hosted | ||
| 10 | - version: "2.4.1" | ||
| 11 | - boolean_selector: | ||
| 12 | - dependency: transitive | ||
| 13 | - description: | ||
| 14 | - name: boolean_selector | ||
| 15 | - url: "https://pub.dartlang.org" | ||
| 16 | - source: hosted | ||
| 17 | - version: "2.0.0" | ||
| 18 | - characters: | ||
| 19 | - dependency: transitive | ||
| 20 | - description: | ||
| 21 | - name: characters | ||
| 22 | - url: "https://pub.dartlang.org" | ||
| 23 | - source: hosted | ||
| 24 | - version: "1.0.0" | ||
| 25 | - charcode: | ||
| 26 | - dependency: transitive | ||
| 27 | - description: | ||
| 28 | - name: charcode | ||
| 29 | - url: "https://pub.dartlang.org" | ||
| 30 | - source: hosted | ||
| 31 | - version: "1.1.3" | ||
| 32 | - clock: | ||
| 33 | - dependency: transitive | ||
| 34 | - description: | ||
| 35 | - name: clock | ||
| 36 | - url: "https://pub.dartlang.org" | ||
| 37 | - source: hosted | ||
| 38 | - version: "1.0.1" | ||
| 39 | - collection: | ||
| 40 | - dependency: transitive | ||
| 41 | - description: | ||
| 42 | - name: collection | ||
| 43 | - url: "https://pub.dartlang.org" | ||
| 44 | - source: hosted | ||
| 45 | - version: "1.14.13" | ||
| 46 | - cupertino_icons: | ||
| 47 | - dependency: "direct main" | ||
| 48 | - description: | ||
| 49 | - name: cupertino_icons | ||
| 50 | - url: "https://pub.dartlang.org" | ||
| 51 | - source: hosted | ||
| 52 | - version: "0.1.3" | ||
| 53 | - fake_async: | ||
| 54 | - dependency: transitive | ||
| 55 | - description: | ||
| 56 | - name: fake_async | ||
| 57 | - url: "https://pub.dartlang.org" | ||
| 58 | - source: hosted | ||
| 59 | - version: "1.1.0" | ||
| 60 | - flutter: | ||
| 61 | - dependency: "direct main" | ||
| 62 | - description: flutter | ||
| 63 | - source: sdk | ||
| 64 | - version: "0.0.0" | ||
| 65 | - flutter_test: | ||
| 66 | - dependency: "direct dev" | ||
| 67 | - description: flutter | ||
| 68 | - source: sdk | ||
| 69 | - version: "0.0.0" | ||
| 70 | - flutter_web_plugins: | ||
| 71 | - dependency: transitive | ||
| 72 | - description: flutter | ||
| 73 | - source: sdk | ||
| 74 | - version: "0.0.0" | ||
| 75 | - matcher: | ||
| 76 | - dependency: transitive | ||
| 77 | - description: | ||
| 78 | - name: matcher | ||
| 79 | - url: "https://pub.dartlang.org" | ||
| 80 | - source: hosted | ||
| 81 | - version: "0.12.8" | ||
| 82 | - meta: | ||
| 83 | - dependency: transitive | ||
| 84 | - description: | ||
| 85 | - name: meta | ||
| 86 | - url: "https://pub.dartlang.org" | ||
| 87 | - source: hosted | ||
| 88 | - version: "1.1.8" | ||
| 89 | - modal_bottom_sheet: | ||
| 90 | - dependency: "direct main" | ||
| 91 | - description: | ||
| 92 | - path: ".." | ||
| 93 | - relative: true | ||
| 94 | - source: path | ||
| 95 | - version: "0.2.0" | ||
| 96 | - path: | ||
| 97 | - dependency: transitive | ||
| 98 | - description: | ||
| 99 | - name: path | ||
| 100 | - url: "https://pub.dartlang.org" | ||
| 101 | - source: hosted | ||
| 102 | - version: "1.7.0" | ||
| 103 | - plugin_platform_interface: | ||
| 104 | - dependency: transitive | ||
| 105 | - description: | ||
| 106 | - name: plugin_platform_interface | ||
| 107 | - url: "https://pub.dartlang.org" | ||
| 108 | - source: hosted | ||
| 109 | - version: "1.0.2" | ||
| 110 | - sky_engine: | ||
| 111 | - dependency: transitive | ||
| 112 | - description: flutter | ||
| 113 | - source: sdk | ||
| 114 | - version: "0.0.99" | ||
| 115 | - source_span: | ||
| 116 | - dependency: transitive | ||
| 117 | - description: | ||
| 118 | - name: source_span | ||
| 119 | - url: "https://pub.dartlang.org" | ||
| 120 | - source: hosted | ||
| 121 | - version: "1.7.0" | ||
| 122 | - stack_trace: | ||
| 123 | - dependency: transitive | ||
| 124 | - description: | ||
| 125 | - name: stack_trace | ||
| 126 | - url: "https://pub.dartlang.org" | ||
| 127 | - source: hosted | ||
| 128 | - version: "1.9.3" | ||
| 129 | - stream_channel: | ||
| 130 | - dependency: transitive | ||
| 131 | - description: | ||
| 132 | - name: stream_channel | ||
| 133 | - url: "https://pub.dartlang.org" | ||
| 134 | - source: hosted | ||
| 135 | - version: "2.0.0" | ||
| 136 | - string_scanner: | ||
| 137 | - dependency: transitive | ||
| 138 | - description: | ||
| 139 | - name: string_scanner | ||
| 140 | - url: "https://pub.dartlang.org" | ||
| 141 | - source: hosted | ||
| 142 | - version: "1.0.5" | ||
| 143 | - term_glyph: | ||
| 144 | - dependency: transitive | ||
| 145 | - description: | ||
| 146 | - name: term_glyph | ||
| 147 | - url: "https://pub.dartlang.org" | ||
| 148 | - source: hosted | ||
| 149 | - version: "1.1.0" | ||
| 150 | - test_api: | ||
| 151 | - dependency: transitive | ||
| 152 | - description: | ||
| 153 | - name: test_api | ||
| 154 | - url: "https://pub.dartlang.org" | ||
| 155 | - source: hosted | ||
| 156 | - version: "0.2.17" | ||
| 157 | - typed_data: | ||
| 158 | - dependency: transitive | ||
| 159 | - description: | ||
| 160 | - name: typed_data | ||
| 161 | - url: "https://pub.dartlang.org" | ||
| 162 | - source: hosted | ||
| 163 | - version: "1.1.6" | ||
| 164 | - url_launcher: | ||
| 165 | - dependency: "direct main" | ||
| 166 | - description: | ||
| 167 | - name: url_launcher | ||
| 168 | - url: "https://pub.dartlang.org" | ||
| 169 | - source: hosted | ||
| 170 | - version: "5.4.2" | ||
| 171 | - url_launcher_macos: | ||
| 172 | - dependency: transitive | ||
| 173 | - description: | ||
| 174 | - name: url_launcher_macos | ||
| 175 | - url: "https://pub.dartlang.org" | ||
| 176 | - source: hosted | ||
| 177 | - version: "0.0.1+4" | ||
| 178 | - url_launcher_platform_interface: | ||
| 179 | - dependency: transitive | ||
| 180 | - description: | ||
| 181 | - name: url_launcher_platform_interface | ||
| 182 | - url: "https://pub.dartlang.org" | ||
| 183 | - source: hosted | ||
| 184 | - version: "1.0.6" | ||
| 185 | - url_launcher_web: | ||
| 186 | - dependency: transitive | ||
| 187 | - description: | ||
| 188 | - name: url_launcher_web | ||
| 189 | - url: "https://pub.dartlang.org" | ||
| 190 | - source: hosted | ||
| 191 | - version: "0.1.1+1" | ||
| 192 | - vector_math: | ||
| 193 | - dependency: transitive | ||
| 194 | - description: | ||
| 195 | - name: vector_math | ||
| 196 | - url: "https://pub.dartlang.org" | ||
| 197 | - source: hosted | ||
| 198 | - version: "2.0.8" | ||
| 199 | -sdks: | ||
| 200 | - dart: ">=2.9.0-14.0.dev <3.0.0" | ||
| 201 | - flutter: ">=1.12.8 <2.0.0" |
| @@ -258,12 +258,13 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -258,12 +258,13 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
| 258 | DateTime _startTime; | 258 | DateTime _startTime; |
| 259 | 259 | ||
| 260 | void _handleScrollUpdate(ScrollNotification notification) { | 260 | void _handleScrollUpdate(ScrollNotification notification) { |
| 261 | + //Check if scrollController is used | ||
| 262 | + if (!_scrollController.hasClients) return; | ||
| 263 | + | ||
| 261 | final scrollPosition = _scrollController.position; | 264 | final scrollPosition = _scrollController.position; |
| 262 | 265 | ||
| 263 | if (scrollPosition.axis == Axis.horizontal) return; | 266 | if (scrollPosition.axis == Axis.horizontal) return; |
| 264 | 267 | ||
| 265 | - //Check if scrollController is used | ||
| 266 | - if (!_scrollController.hasClients) return; | ||
| 267 | 268 | ||
| 268 | final isScrollReversed = scrollPosition.axisDirection == AxisDirection.down; | 269 | final isScrollReversed = scrollPosition.axisDirection == AxisDirection.down; |
| 269 | final offset = isScrollReversed | 270 | final offset = isScrollReversed |
| @@ -238,6 +238,13 @@ Future<T> showCustomModalBottomSheet<T>({ | @@ -238,6 +238,13 @@ Future<T> showCustomModalBottomSheet<T>({ | ||
| 238 | assert(enableDrag != null); | 238 | assert(enableDrag != null); |
| 239 | assert(debugCheckHasMediaQuery(context)); | 239 | assert(debugCheckHasMediaQuery(context)); |
| 240 | assert(debugCheckHasMaterialLocalizations(context)); | 240 | assert(debugCheckHasMaterialLocalizations(context)); |
| 241 | + final hasMaterialLocalizations = | ||
| 242 | + Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) != | ||
| 243 | + null; | ||
| 244 | + final barrierLabel = hasMaterialLocalizations | ||
| 245 | + ? MaterialLocalizations.of(context).modalBarrierDismissLabel | ||
| 246 | + : ''; | ||
| 247 | + | ||
| 241 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) | 248 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) |
| 242 | .push(ModalBottomSheetRoute<T>( | 249 | .push(ModalBottomSheetRoute<T>( |
| 243 | builder: builder, | 250 | builder: builder, |
| @@ -245,7 +252,7 @@ Future<T> showCustomModalBottomSheet<T>({ | @@ -245,7 +252,7 @@ Future<T> showCustomModalBottomSheet<T>({ | ||
| 245 | containerBuilder: containerWidget, | 252 | containerBuilder: containerWidget, |
| 246 | secondAnimationController: secondAnimation, | 253 | secondAnimationController: secondAnimation, |
| 247 | expanded: expand, | 254 | expanded: expand, |
| 248 | - barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | 255 | + barrierLabel: barrierLabel, |
| 249 | isDismissible: isDismissible, | 256 | isDismissible: isDismissible, |
| 250 | modalBarrierColor: barrierColor, | 257 | modalBarrierColor: barrierColor, |
| 251 | enableDrag: enableDrag, | 258 | enableDrag: enableDrag, |
pubspec.lock
deleted
100644 → 0
| 1 | -# Generated by pub | ||
| 2 | -# See https://dart.dev/tools/pub/glossary#lockfile | ||
| 3 | -packages: | ||
| 4 | - async: | ||
| 5 | - dependency: transitive | ||
| 6 | - description: | ||
| 7 | - name: async | ||
| 8 | - url: "https://pub.dartlang.org" | ||
| 9 | - source: hosted | ||
| 10 | - version: "2.4.1" | ||
| 11 | - boolean_selector: | ||
| 12 | - dependency: transitive | ||
| 13 | - description: | ||
| 14 | - name: boolean_selector | ||
| 15 | - url: "https://pub.dartlang.org" | ||
| 16 | - source: hosted | ||
| 17 | - version: "2.0.0" | ||
| 18 | - characters: | ||
| 19 | - dependency: transitive | ||
| 20 | - description: | ||
| 21 | - name: characters | ||
| 22 | - url: "https://pub.dartlang.org" | ||
| 23 | - source: hosted | ||
| 24 | - version: "1.0.0" | ||
| 25 | - charcode: | ||
| 26 | - dependency: transitive | ||
| 27 | - description: | ||
| 28 | - name: charcode | ||
| 29 | - url: "https://pub.dartlang.org" | ||
| 30 | - source: hosted | ||
| 31 | - version: "1.1.3" | ||
| 32 | - clock: | ||
| 33 | - dependency: transitive | ||
| 34 | - description: | ||
| 35 | - name: clock | ||
| 36 | - url: "https://pub.dartlang.org" | ||
| 37 | - source: hosted | ||
| 38 | - version: "1.0.1" | ||
| 39 | - collection: | ||
| 40 | - dependency: transitive | ||
| 41 | - description: | ||
| 42 | - name: collection | ||
| 43 | - url: "https://pub.dartlang.org" | ||
| 44 | - source: hosted | ||
| 45 | - version: "1.14.13" | ||
| 46 | - fake_async: | ||
| 47 | - dependency: transitive | ||
| 48 | - description: | ||
| 49 | - name: fake_async | ||
| 50 | - url: "https://pub.dartlang.org" | ||
| 51 | - source: hosted | ||
| 52 | - version: "1.1.0" | ||
| 53 | - flutter: | ||
| 54 | - dependency: "direct main" | ||
| 55 | - description: flutter | ||
| 56 | - source: sdk | ||
| 57 | - version: "0.0.0" | ||
| 58 | - flutter_test: | ||
| 59 | - dependency: "direct dev" | ||
| 60 | - description: flutter | ||
| 61 | - source: sdk | ||
| 62 | - version: "0.0.0" | ||
| 63 | - matcher: | ||
| 64 | - dependency: transitive | ||
| 65 | - description: | ||
| 66 | - name: matcher | ||
| 67 | - url: "https://pub.dartlang.org" | ||
| 68 | - source: hosted | ||
| 69 | - version: "0.12.8" | ||
| 70 | - meta: | ||
| 71 | - dependency: transitive | ||
| 72 | - description: | ||
| 73 | - name: meta | ||
| 74 | - url: "https://pub.dartlang.org" | ||
| 75 | - source: hosted | ||
| 76 | - version: "1.1.8" | ||
| 77 | - path: | ||
| 78 | - dependency: transitive | ||
| 79 | - description: | ||
| 80 | - name: path | ||
| 81 | - url: "https://pub.dartlang.org" | ||
| 82 | - source: hosted | ||
| 83 | - version: "1.7.0" | ||
| 84 | - pedantic: | ||
| 85 | - dependency: "direct dev" | ||
| 86 | - description: | ||
| 87 | - name: pedantic | ||
| 88 | - url: "https://pub.dartlang.org" | ||
| 89 | - source: hosted | ||
| 90 | - version: "1.9.0" | ||
| 91 | - sky_engine: | ||
| 92 | - dependency: transitive | ||
| 93 | - description: flutter | ||
| 94 | - source: sdk | ||
| 95 | - version: "0.0.99" | ||
| 96 | - source_span: | ||
| 97 | - dependency: transitive | ||
| 98 | - description: | ||
| 99 | - name: source_span | ||
| 100 | - url: "https://pub.dartlang.org" | ||
| 101 | - source: hosted | ||
| 102 | - version: "1.7.0" | ||
| 103 | - stack_trace: | ||
| 104 | - dependency: transitive | ||
| 105 | - description: | ||
| 106 | - name: stack_trace | ||
| 107 | - url: "https://pub.dartlang.org" | ||
| 108 | - source: hosted | ||
| 109 | - version: "1.9.3" | ||
| 110 | - stream_channel: | ||
| 111 | - dependency: transitive | ||
| 112 | - description: | ||
| 113 | - name: stream_channel | ||
| 114 | - url: "https://pub.dartlang.org" | ||
| 115 | - source: hosted | ||
| 116 | - version: "2.0.0" | ||
| 117 | - string_scanner: | ||
| 118 | - dependency: transitive | ||
| 119 | - description: | ||
| 120 | - name: string_scanner | ||
| 121 | - url: "https://pub.dartlang.org" | ||
| 122 | - source: hosted | ||
| 123 | - version: "1.0.5" | ||
| 124 | - term_glyph: | ||
| 125 | - dependency: transitive | ||
| 126 | - description: | ||
| 127 | - name: term_glyph | ||
| 128 | - url: "https://pub.dartlang.org" | ||
| 129 | - source: hosted | ||
| 130 | - version: "1.1.0" | ||
| 131 | - test_api: | ||
| 132 | - dependency: transitive | ||
| 133 | - description: | ||
| 134 | - name: test_api | ||
| 135 | - url: "https://pub.dartlang.org" | ||
| 136 | - source: hosted | ||
| 137 | - version: "0.2.17" | ||
| 138 | - typed_data: | ||
| 139 | - dependency: transitive | ||
| 140 | - description: | ||
| 141 | - name: typed_data | ||
| 142 | - url: "https://pub.dartlang.org" | ||
| 143 | - source: hosted | ||
| 144 | - version: "1.1.6" | ||
| 145 | - vector_math: | ||
| 146 | - dependency: transitive | ||
| 147 | - description: | ||
| 148 | - name: vector_math | ||
| 149 | - url: "https://pub.dartlang.org" | ||
| 150 | - source: hosted | ||
| 151 | - version: "2.0.8" | ||
| 152 | -sdks: | ||
| 153 | - dart: ">=2.9.0-14.0.dev <3.0.0" | ||
| 154 | - flutter: ">=1.12.0 <2.0.0" |
-
Please register or login to post a comment