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-08-04 18:52:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
00e14f026bdb9db887658d7b32a5c56e2388776d
00e14f02
1 parent
e5b8f541
Add support to all params showBarModalButtonSheet
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
lib/src/bottom_sheets/bar_bottom_sheet.dart
lib/src/bottom_sheets/bar_bottom_sheet.dart
View file @
00e14f0
...
...
@@ -10,11 +10,18 @@ const Radius _default_bar_top_radius = Radius.circular(15);
class
BarBottomSheet
extends
StatelessWidget
{
final
Widget
child
;
final
Widget
topControl
;
final
Radius
topRadius
;
final
Widget
control
;
final
Clip
clipBehavior
;
final
double
elevation
;
final
ShapeBorder
shape
;
const
BarBottomSheet
(
{
Key
key
,
this
.
child
,
this
.
topControl
,
@required
this
.
topRadius
})
{
Key
key
,
this
.
child
,
this
.
control
,
this
.
clipBehavior
,
this
.
shape
,
this
.
elevation
})
:
super
(
key:
key
);
@override
...
...
@@ -28,7 +35,7 @@ class BarBottomSheet extends StatelessWidget {
SizedBox
(
height:
12
),
SafeArea
(
bottom:
false
,
child:
topC
ontrol
??
child:
c
ontrol
??
Container
(
height:
6
,
width:
40
,
...
...
@@ -41,21 +48,20 @@ class BarBottomSheet extends StatelessWidget {
Flexible
(
flex:
1
,
fit:
FlexFit
.
loose
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
topRadius
,
topRight:
topRadius
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Theme
.
of
(
context
).
scaffoldBackgroundColor
,
boxShadow:
[
BoxShadow
(
blurRadius:
10
,
color:
Colors
.
black12
,
spreadRadius:
5
)
]),
child:
Material
(
shape:
RoundedRectangleBorder
(
side:
BorderSide
(),
borderRadius:
BorderRadius
.
only
(
topLeft:
_default_bar_top_radius
,
topRight:
_default_bar_top_radius
),
),
clipBehavior:
clipBehavior
??
Clip
.
hardEdge
,
elevation:
elevation
??
2
,
child:
SizedBox
(
width:
double
.
infinity
,
child:
MediaQuery
.
removePadding
(
context:
context
,
removeTop:
true
,
child:
child
)),
context:
context
,
removeTop:
true
,
child:
child
),
),
),
),
]),
...
...
@@ -78,7 +84,6 @@ Future<T> showBarModalBottomSheet<T>({
bool
useRootNavigator
=
false
,
bool
isDismissible
=
true
,
bool
enableDrag
=
true
,
Radius
topRadius
=
_default_bar_top_radius
,
Widget
topControl
,
Duration
duration
,
})
async
{
...
...
@@ -96,8 +101,10 @@ Future<T> showBarModalBottomSheet<T>({
bounce:
bounce
,
containerBuilder:
(
_
,
__
,
child
)
=>
BarBottomSheet
(
child:
child
,
topRadius:
topRadius
,
topControl:
topControl
,
control:
topControl
,
clipBehavior:
clipBehavior
,
shape:
shape
,
elevation:
elevation
,
),
secondAnimationController:
secondAnimation
,
expanded:
expand
,
...
...
Please
register
or
login
to post a comment