Showing
1 changed file
with
5 additions
and
2 deletions
| @@ -264,11 +264,13 @@ class _CupertinoModalTransition extends StatelessWidget { | @@ -264,11 +264,13 @@ class _CupertinoModalTransition extends StatelessWidget { | ||
| 264 | 264 | ||
| 265 | class _CupertinoScaffold extends InheritedWidget { | 265 | class _CupertinoScaffold extends InheritedWidget { |
| 266 | final AnimationController animation; | 266 | final AnimationController animation; |
| 267 | + final Radius topRadius; | ||
| 267 | 268 | ||
| 268 | @override | 269 | @override |
| 269 | final Widget child; | 270 | final Widget child; |
| 270 | 271 | ||
| 271 | - const _CupertinoScaffold({Key key, this.animation, this.child}) | 272 | + const _CupertinoScaffold( |
| 273 | + {Key key, this.animation, this.child, this.topRadius}) | ||
| 272 | : super(key: key, child: child); | 274 | : super(key: key, child: child); |
| 273 | 275 | ||
| 274 | @override | 276 | @override |
| @@ -304,7 +306,6 @@ class CupertinoScaffold extends StatefulWidget { | @@ -304,7 +306,6 @@ class CupertinoScaffold extends StatefulWidget { | ||
| 304 | bool bounce = true, | 306 | bool bounce = true, |
| 305 | bool isDismissible, | 307 | bool isDismissible, |
| 306 | bool enableDrag = true, | 308 | bool enableDrag = true, |
| 307 | - Radius topRadius = _default_top_radius, | ||
| 308 | Duration duration, | 309 | Duration duration, |
| 309 | }) async { | 310 | }) async { |
| 310 | assert(context != null); | 311 | assert(context != null); |
| @@ -319,6 +320,7 @@ class CupertinoScaffold extends StatefulWidget { | @@ -319,6 +320,7 @@ class CupertinoScaffold extends StatefulWidget { | ||
| 319 | assert(debugCheckHasMaterialLocalizations(context)); | 320 | assert(debugCheckHasMaterialLocalizations(context)); |
| 320 | barrierLabel = MaterialLocalizations.of(context).modalBarrierDismissLabel; | 321 | barrierLabel = MaterialLocalizations.of(context).modalBarrierDismissLabel; |
| 321 | } | 322 | } |
| 323 | + final topRadius = CupertinoScaffold.of(context).topRadius; | ||
| 322 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) | 324 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) |
| 323 | .push(CupertinoModalBottomSheetRoute<T>( | 325 | .push(CupertinoModalBottomSheetRoute<T>( |
| 324 | builder: builder, | 326 | builder: builder, |
| @@ -365,6 +367,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold> | @@ -365,6 +367,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold> | ||
| 365 | Widget build(BuildContext context) { | 367 | Widget build(BuildContext context) { |
| 366 | return _CupertinoScaffold( | 368 | return _CupertinoScaffold( |
| 367 | animation: animationController, | 369 | animation: animationController, |
| 370 | + topRadius: widget.topRadius, | ||
| 368 | child: _CupertinoModalTransition( | 371 | child: _CupertinoModalTransition( |
| 369 | secondaryAnimation: animationController, | 372 | secondaryAnimation: animationController, |
| 370 | body: widget.body, | 373 | body: widget.body, |
-
Please register or login to post a comment