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
bierbaumtim
2022-03-27 17:18:18 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
094a626ba2c00c6ea0b200382b6e3ceade3ebe83
094a626b
1 parent
bfa88676
fix backgroundColor of Avatar
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
43 deletions
example/lib/modals/circular_modal.dart
example/lib/modals/circular_modal.dart
View file @
094a626
...
...
@@ -17,52 +17,59 @@ class AvatarBottomSheet extends StatelessWidget {
return
AnnotatedRegion
<
SystemUiOverlayStyle
>(
value:
SystemUiOverlayStyle
.
light
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
height:
12
),
SafeArea
(
bottom:
false
,
child:
AnimatedBuilder
(
animation:
animation
,
builder:
(
context
,
child
)
=>
Transform
.
translate
(
offset:
Offset
(
0
,
(
1
-
animation
.
value
)
*
100
),
child:
Opacity
(
child:
child
,
opacity:
max
(
0
,
animation
.
value
*
2
-
1
))),
child:
Row
(
children:
<
Widget
>[
SizedBox
(
width:
20
),
CircleAvatar
(
child:
Text
(
'JB'
),
radius:
32
,
),
],
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
height:
12
),
SafeArea
(
bottom:
false
,
child:
AnimatedBuilder
(
animation:
animation
,
builder:
(
context
,
child
)
=>
Transform
.
translate
(
offset:
Offset
(
0
,
(
1
-
animation
.
value
)
*
100
),
child:
Opacity
(
child:
child
,
opacity:
max
(
0
,
animation
.
value
*
2
-
1
))),
child:
Row
(
children:
<
Widget
>[
SizedBox
(
width:
20
),
CircleAvatar
(
child:
Text
(
'JB'
,
style:
TextStyle
(
color:
Colors
.
black
),
),
radius:
32
,
backgroundColor:
Colors
.
blueAccent
,
),
)),
SizedBox
(
height:
12
),
Flexible
(
flex:
1
,
fit:
FlexFit
.
loose
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
15
),
topRight:
Radius
.
circular
(
15
)),
child:
Container
(
decoration:
BoxDecoration
(
color:
Theme
.
of
(
context
).
scaffoldBackgroundColor
,
boxShadow:
[
BoxShadow
(
blurRadius:
10
,
color:
Colors
.
black12
,
spreadRadius:
5
)
]),
width:
double
.
infinity
,
child:
MediaQuery
.
removePadding
(
context:
context
,
removeTop:
true
,
child:
child
)),
],
),
),
]),
),
SizedBox
(
height:
12
),
Flexible
(
flex:
1
,
fit:
FlexFit
.
loose
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
15
),
topRight:
Radius
.
circular
(
15
)),
child:
Container
(
decoration:
BoxDecoration
(
color:
Theme
.
of
(
context
).
scaffoldBackgroundColor
,
boxShadow:
[
BoxShadow
(
blurRadius:
10
,
color:
Colors
.
black12
,
spreadRadius:
5
,
),
],
),
width:
double
.
infinity
,
child:
MediaQuery
.
removePadding
(
context:
context
,
removeTop:
true
,
child:
child
),
),
),
),
],
),
);
}
}
...
...
Please
register
or
login
to post a comment