Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Rodinei Fagundes
2020-05-17 18:16:00 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c285b788d6881d9e1aea3bd40eb1a79e571f29b3
c285b788
1 parent
11ae9601
add topRadius to CupertinoScaffold InheritedWidget
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
lib/src/bottom_sheets/cupertino_bottom_sheet.dart
lib/src/bottom_sheets/cupertino_bottom_sheet.dart
View file @
c285b78
...
...
@@ -264,11 +264,13 @@ class _CupertinoModalTransition extends StatelessWidget {
class
_CupertinoScaffold
extends
InheritedWidget
{
final
AnimationController
animation
;
final
Radius
topRadius
;
@override
final
Widget
child
;
const
_CupertinoScaffold
({
Key
key
,
this
.
animation
,
this
.
child
})
const
_CupertinoScaffold
(
{
Key
key
,
this
.
animation
,
this
.
child
,
this
.
topRadius
})
:
super
(
key:
key
,
child:
child
);
@override
...
...
@@ -304,7 +306,6 @@ class CupertinoScaffold extends StatefulWidget {
bool
bounce
=
true
,
bool
isDismissible
,
bool
enableDrag
=
true
,
Radius
topRadius
=
_default_top_radius
,
Duration
duration
,
})
async
{
assert
(
context
!=
null
);
...
...
@@ -319,6 +320,7 @@ class CupertinoScaffold extends StatefulWidget {
assert
(
debugCheckHasMaterialLocalizations
(
context
));
barrierLabel
=
MaterialLocalizations
.
of
(
context
).
modalBarrierDismissLabel
;
}
final
topRadius
=
CupertinoScaffold
.
of
(
context
).
topRadius
;
final
result
=
await
Navigator
.
of
(
context
,
rootNavigator:
useRootNavigator
)
.
push
(
CupertinoModalBottomSheetRoute
<
T
>(
builder:
builder
,
...
...
@@ -365,6 +367,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold>
Widget
build
(
BuildContext
context
)
{
return
_CupertinoScaffold
(
animation:
animationController
,
topRadius:
widget
.
topRadius
,
child:
_CupertinoModalTransition
(
secondaryAnimation:
animationController
,
body:
widget
.
body
,
...
...
Please
register
or
login
to post a comment