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
Sergey Bunas
2020-07-18 21:12:37 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
49834da25bccf069ca8d14776693f1a37d5ba1e2
49834da2
1 parent
2d4e8d3c
add: topControl, topRadius to bar_bottom_sheet.dart
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
lib/src/bottom_sheets/bar_bottom_sheet.dart
lib/src/bottom_sheets/bar_bottom_sheet.dart
View file @
49834da
...
...
@@ -6,10 +6,16 @@ import 'package:flutter/services.dart';
import
'../../modal_bottom_sheet.dart'
;
import
'../bottom_sheet_route.dart'
;
const
Radius
_default_bar_top_radius
=
Radius
.
circular
(
15
);
class
BarBottomSheet
extends
StatelessWidget
{
final
Widget
child
;
final
Widget
topControl
;
final
Radius
topRadius
;
const
BarBottomSheet
({
Key
key
,
this
.
child
})
:
super
(
key:
key
);
const
BarBottomSheet
(
{
Key
key
,
this
.
child
,
this
.
topControl
,
@required
this
.
topRadius
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -22,7 +28,8 @@ class BarBottomSheet extends StatelessWidget {
SizedBox
(
height:
12
),
SafeArea
(
bottom:
false
,
child:
Container
(
child:
topControl
??
Container
(
height:
6
,
width:
40
,
decoration:
BoxDecoration
(
...
...
@@ -35,9 +42,8 @@ class BarBottomSheet extends StatelessWidget {
flex:
1
,
fit:
FlexFit
.
loose
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
15
),
topRight:
Radius
.
circular
(
15
)),
borderRadius:
BorderRadius
.
only
(
topLeft:
topRadius
,
topRight:
topRadius
),
child:
Container
(
decoration:
BoxDecoration
(
color:
Theme
.
of
(
context
).
scaffoldBackgroundColor
,
...
...
@@ -72,6 +78,8 @@ Future<T> showBarModalBottomSheet<T>({
bool
useRootNavigator
=
false
,
bool
isDismissible
=
true
,
bool
enableDrag
=
true
,
Radius
topRadius
=
_default_bar_top_radius
,
Widget
topControl
,
Duration
duration
,
})
async
{
assert
(
context
!=
null
);
...
...
@@ -88,6 +96,8 @@ Future<T> showBarModalBottomSheet<T>({
bounce:
bounce
,
containerBuilder:
(
_
,
__
,
child
)
=>
BarBottomSheet
(
child:
child
,
topRadius:
topRadius
,
topControl:
topControl
,
),
secondAnimationController:
secondAnimation
,
expanded:
expand
,
...
...
Please
register
or
login
to post a comment