Showing
3 changed files
with
30 additions
and
2 deletions
1 | +## [1.0.0-dev] - Improved performance and breaking change | ||
2 | +- The `builder` param has changed from: | ||
3 | +```dart | ||
4 | +showMaterialModalBottomSheet( | ||
5 | + context: context, | ||
6 | + builder: (context, scrollController) { | ||
7 | + return SingleChildScrollView( | ||
8 | + controller: scrollController, | ||
9 | + child: Container() | ||
10 | + ) | ||
11 | + }, | ||
12 | +) | ||
13 | +``` | ||
14 | +to | ||
15 | + | ||
16 | +```dart | ||
17 | +showMaterialModalBottomSheet( | ||
18 | + context: context, | ||
19 | + builder: (context) { | ||
20 | + return SingleChildScrollView( | ||
21 | + controller: ModalScrollController.of(context), | ||
22 | + child: Container() | ||
23 | + ) | ||
24 | + }, | ||
25 | +) | ||
26 | +``` | ||
27 | +- Appart from the visual change, with this changes you can access the controller from every inner widget without having to pass it to every constructor. Also now the builder method will be called only once as before it was calling multiple times while the modal was being animated. | ||
28 | + | ||
1 | ## [0.2.1+2] - Reverse fix Flutter 22 beta breaking change | 29 | ## [0.2.1+2] - Reverse fix Flutter 22 beta breaking change |
2 | - https://github.com/jamesblasco/modal_bottom_sheet/issues/69 | 30 | - https://github.com/jamesblasco/modal_bottom_sheet/issues/69 |
3 | 31 |
@@ -92,7 +92,7 @@ packages: | @@ -92,7 +92,7 @@ packages: | ||
92 | path: ".." | 92 | path: ".." |
93 | relative: true | 93 | relative: true |
94 | source: path | 94 | source: path |
95 | - version: "0.2.1+2" | 95 | + version: "1.0.0-dev" |
96 | path: | 96 | path: |
97 | dependency: transitive | 97 | dependency: transitive |
98 | description: | 98 | description: |
1 | name: modal_bottom_sheet | 1 | name: modal_bottom_sheet |
2 | description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' | 2 | description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' |
3 | -version: 0.2.1+2 | 3 | +version: 1.0.0-dev |
4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' | 4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment