Skip to content

Commit dd9709b

Browse files
committed
Prepare version 0.2.0
1 parent e5dad3d commit dd9709b

File tree

9 files changed

+50
-79
lines changed

9 files changed

+50
-79
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@
1212
## [0.1.6] - New custom params
1313
- Use `duration` to define the opening duration of the modal
1414
- Change the top radius of the cupertino bottom sheet
15-
Thanks to @bierbaumtim @troyanskiy @rodineijf for the contributions
15+
Thanks to @bierbaumtim @troyanskiy @rodineijf for the contributions
16+
17+
18+
## [0.2.0] - New Cool Features
19+
- Added support for scroll-to-top by tapping the status bar on iOS devices.
20+
- Use `curveAnimation` to define a custom curve animation for the modal transition
21+
- Bug fixes releated to horizontal scroll, clamping physics and othes.

example/lib/examples/cupertino_share.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
88
class CupertinoSharePage extends StatelessWidget {
99
@override
1010
Widget build(BuildContext context) {
11-
1211
return Scaffold(
1312
appBar: appBar(context),
1413
body: CupertinoPageScaffold(

example/lib/modals/modal_inside_modal.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class ModalInsideModal extends StatelessWidget {
3535
backgroundColor: Colors.transparent,
3636
builder: (context, scrollController) =>
3737
ModalInsideModal(
38-
scrollController: scrollController, reverse: reverse),
38+
scrollController: scrollController,
39+
reverse: reverse),
3940
)),
4041
)).toList(),
4142
),

example/pubspec.lock

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
# Generated by pub
22
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
4-
archive:
5-
dependency: transitive
6-
description:
7-
name: archive
8-
url: "https://pub.dartlang.org"
9-
source: hosted
10-
version: "2.0.13"
11-
args:
12-
dependency: transitive
13-
description:
14-
name: args
15-
url: "https://pub.dartlang.org"
16-
source: hosted
17-
version: "1.6.0"
184
async:
195
dependency: transitive
206
description:
@@ -29,41 +15,48 @@ packages:
2915
url: "https://pub.dartlang.org"
3016
source: hosted
3117
version: "2.0.0"
32-
charcode:
18+
characters:
3319
dependency: transitive
3420
description:
35-
name: charcode
21+
name: characters
3622
url: "https://pub.dartlang.org"
3723
source: hosted
38-
version: "1.1.3"
39-
collection:
24+
version: "1.0.0"
25+
charcode:
4026
dependency: transitive
4127
description:
42-
name: collection
28+
name: charcode
4329
url: "https://pub.dartlang.org"
4430
source: hosted
45-
version: "1.14.12"
46-
convert:
31+
version: "1.1.3"
32+
clock:
4733
dependency: transitive
4834
description:
49-
name: convert
35+
name: clock
5036
url: "https://pub.dartlang.org"
5137
source: hosted
52-
version: "2.1.1"
53-
crypto:
38+
version: "1.0.1"
39+
collection:
5440
dependency: transitive
5541
description:
56-
name: crypto
42+
name: collection
5743
url: "https://pub.dartlang.org"
5844
source: hosted
59-
version: "2.1.4"
45+
version: "1.14.13"
6046
cupertino_icons:
6147
dependency: "direct main"
6248
description:
6349
name: cupertino_icons
6450
url: "https://pub.dartlang.org"
6551
source: hosted
6652
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"
6760
flutter:
6861
dependency: "direct main"
6962
description: flutter
@@ -79,20 +72,13 @@ packages:
7972
description: flutter
8073
source: sdk
8174
version: "0.0.0"
82-
image:
83-
dependency: transitive
84-
description:
85-
name: image
86-
url: "https://pub.dartlang.org"
87-
source: hosted
88-
version: "2.1.12"
8975
matcher:
9076
dependency: transitive
9177
description:
9278
name: matcher
9379
url: "https://pub.dartlang.org"
9480
source: hosted
95-
version: "0.12.6"
81+
version: "0.12.8"
9682
meta:
9783
dependency: transitive
9884
description:
@@ -106,35 +92,21 @@ packages:
10692
path: ".."
10793
relative: true
10894
source: path
109-
version: "0.1.6"
95+
version: "0.2.0"
11096
path:
11197
dependency: transitive
11298
description:
11399
name: path
114100
url: "https://pub.dartlang.org"
115101
source: hosted
116-
version: "1.6.4"
117-
petitparser:
118-
dependency: transitive
119-
description:
120-
name: petitparser
121-
url: "https://pub.dartlang.org"
122-
source: hosted
123-
version: "2.4.0"
102+
version: "1.7.0"
124103
plugin_platform_interface:
125104
dependency: transitive
126105
description:
127106
name: plugin_platform_interface
128107
url: "https://pub.dartlang.org"
129108
source: hosted
130109
version: "1.0.2"
131-
quiver:
132-
dependency: transitive
133-
description:
134-
name: quiver
135-
url: "https://pub.dartlang.org"
136-
source: hosted
137-
version: "2.1.3"
138110
sky_engine:
139111
dependency: transitive
140112
description: flutter
@@ -181,7 +153,7 @@ packages:
181153
name: test_api
182154
url: "https://pub.dartlang.org"
183155
source: hosted
184-
version: "0.2.15"
156+
version: "0.2.17"
185157
typed_data:
186158
dependency: transitive
187159
description:
@@ -224,13 +196,6 @@ packages:
224196
url: "https://pub.dartlang.org"
225197
source: hosted
226198
version: "2.0.8"
227-
xml:
228-
dependency: transitive
229-
description:
230-
name: xml
231-
url: "https://pub.dartlang.org"
232-
source: hosted
233-
version: "3.6.1"
234199
sdks:
235-
dart: ">=2.7.0 <3.0.0"
200+
dart: ">=2.9.0-14.0.dev <3.0.0"
236201
flutter: ">=1.12.8 <2.0.0"

lib/src/bottom_sheet.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import 'package:flutter/widgets.dart';
1313
import 'package:modal_bottom_sheet/src/utils/primary_scroll_status_bar.dart';
1414

1515
import 'package:modal_bottom_sheet/src/utils/bottom_sheet_suspended_curve.dart';
16-
import 'package:modal_bottom_sheet/src/utils/primary_scroll_status_bar.dart';
1716

1817

1918
const Curve _decelerateEasing = Cubic(0.0, 0.0, 0.2, 1.0);

lib/src/bottom_sheet_route.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
3939
final platform = Theme.of(context)?.platform ?? defaultTargetPlatform;
4040
switch (platform) {
4141
case TargetPlatform.iOS:
42+
case TargetPlatform.linux:
43+
case TargetPlatform.macOS:
44+
case TargetPlatform.windows:
4245
return '';
4346
case TargetPlatform.android:
4447
case TargetPlatform.fuchsia:

lib/src/bottom_sheets/cupertino_bottom_sheet.dart

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,17 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> {
187187
(paddingTop + _behind_widget_visible_height) * 0.9;
188188
final offsetY = secondaryAnimation.value * (paddingTop - distanceWithScale);
189189
final scale = 1 - secondaryAnimation.value / 10;
190-
return AnimatedBuilder(
191-
builder: (context, child) => Transform.translate(
192-
offset: Offset(0, offsetY),
193-
child: Transform.scale(
194-
scale: scale,
195-
child: child,
196-
alignment: Alignment.topCenter,
197-
),
190+
return AnimatedBuilder(
191+
builder: (context, child) => Transform.translate(
192+
offset: Offset(0, offsetY),
193+
child: Transform.scale(
194+
scale: scale,
195+
child: child,
196+
alignment: Alignment.topCenter,
198197
),
199-
child: child,
200-
animation: secondaryAnimation,
201-
198+
),
199+
child: child,
200+
animation: secondaryAnimation,
202201
);
203202
}
204203

@@ -279,7 +278,6 @@ class _CupertinoModalTransition extends StatelessWidget {
279278
}
280279
}
281280

282-
283281
class _CupertinoScaffold extends InheritedWidget {
284282
final AnimationController animation;
285283

@@ -339,7 +337,7 @@ class CupertinoScaffold extends StatefulWidget {
339337
assert(enableDrag != null);
340338
assert(debugCheckHasMediaQuery(context));
341339
final isCupertinoApp = Theme.of(context, shadowThemeOnly: true) == null;
342-
String barrierLabel = '';
340+
var barrierLabel = '';
343341
if (!isCupertinoApp) {
344342
assert(debugCheckHasMaterialLocalizations(context));
345343
barrierLabel = MaterialLocalizations.of(context).modalBarrierDismissLabel;

lib/src/utils/bottom_sheet_suspended_curve.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class BottomSheetSuspendedCurve extends ParametricCurve<double> {
5454
return t;
5555
}
5656

57-
final double curveProgress = (t - startingPoint) / (1 - startingPoint);
58-
final double transformed = curve.transform(curveProgress);
57+
final curveProgress = (t - startingPoint) / (1 - startingPoint);
58+
final transformed = curve.transform(curveProgress);
5959
return lerpDouble(startingPoint, 1, transformed);
6060
}
6161

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: modal_bottom_sheet
22
description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style'
3-
version: 0.1.6
3+
version: 0.2.0
44
homepage: 'https://github.com/jamesblasco/modal_bottom_sheet'
55

66
environment:

0 commit comments

Comments
 (0)