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
Jaime Blasco
2020-07-05 13:49:47 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78759e8a8fcb9679301a4496213ffe0729f1f2ae
78759e8a
1 parent
2c0b5b28
Organize examples in simple and complex cases
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
example/lib/main.dart
example/lib/main.dart
View file @
78759e8
...
...
@@ -112,6 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
child:
SafeArea
(
bottom:
false
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
ListTile
(
...
...
@@ -119,6 +120,7 @@ class _MyHomePageState extends State<MyHomePage> {
onTap:
()
=>
Navigator
.
of
(
context
).
push
(
MaterialWithModalsPageRoute
(
builder:
(
context
)
=>
CupertinoSharePage
()))),
section
(
'STYLES'
),
ListTile
(
title:
Text
(
'Material fit'
),
onTap:
()
=>
showMaterialModalBottomSheet
(
...
...
@@ -139,16 +141,6 @@ class _MyHomePageState extends State<MyHomePage> {
scrollController:
scrollController
),
)),
ListTile
(
title:
Text
(
'Bar Modal reverse list'
),
onTap:
()
=>
showBarModalBottomSheet
(
expand:
true
,
context:
context
,
backgroundColor:
Colors
.
transparent
,
builder:
(
context
,
scrollController
)
=>
ModalInsideModal
(
scrollController:
scrollController
,
reverse:
true
),
)),
ListTile
(
title:
Text
(
'Avatar Modal'
),
onTap:
()
=>
showAvatarModalBottomSheet
(
expand:
true
,
...
...
@@ -174,6 +166,7 @@ class _MyHomePageState extends State<MyHomePage> {
builder:
(
context
,
scrollController
)
=>
ModalFit
(
scrollController:
scrollController
),
)),
section
(
'COMPLEX CASES'
),
ListTile
(
title:
Text
(
'Cupertino Small Modal forced to expand'
),
onTap:
()
=>
showCupertinoModalBottomSheet
(
...
...
@@ -184,6 +177,17 @@ class _MyHomePageState extends State<MyHomePage> {
ModalFit
(
scrollController:
scrollController
),
)),
ListTile
(
title:
Text
(
'Reverse list'
),
onTap:
()
=>
showBarModalBottomSheet
(
expand:
true
,
context:
context
,
backgroundColor:
Colors
.
transparent
,
builder:
(
context
,
scrollController
)
=>
ModalInsideModal
(
scrollController:
scrollController
,
reverse:
true
),
)),
ListTile
(
title:
Text
(
'Cupertino Modal inside modal'
),
onTap:
()
=>
showCupertinoModalBottomSheet
(
expand:
true
,
...
...
@@ -232,4 +236,13 @@ class _MyHomePageState extends State<MyHomePage> {
),
);
}
Widget
section
(
String
title
)
{
return
Padding
(
padding:
EdgeInsets
.
fromLTRB
(
16
,
20
,
16
,
8
),
child:
Text
(
title
,
style:
Theme
.
of
(
context
).
textTheme
.
caption
,
));
}
}
...
...
Please
register
or
login
to post a comment