![](/img/trans.png)
[英]How to create animated stacked card with left and right slider in flutter?
[英]How I can create icon at left and right in a card using Flutter/Dart
我不知道如何更改已在右上角突出顯示的圖標。 我已經使用spceBetween
,但仍然不影響更改。
class _SidebarState extends State<Sidebar> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Color.fromARGB(255, 44, 41, 56),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
borderRadius: BorderRadius.only(topRight: const Radius.circular(20))),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(32.0)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
child: Material(
shadowColor: Colors.transparent,
color: Colors.transparent,
child: IconButton(
icon: Icon(Icons.menu,
color: Color.fromARGB(255, 247, 243, 243)),
onPressed: widget.onSideBarPressed,
),
),
),
Container(
color: Colors.amber,
child: Material(
shadowColor: Colors.transparent,
color: Colors.transparent,
child: IconButton(
icon: Icon(Icons.access_time,
color: Color.fromARGB(255, 247, 243, 243)),
onPressed: widget.onSideBarPressed,
),
),
)
],
)),
Expanded(
flex: 2,
child: Text(
widget.title,
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18,
decoration: TextDecoration.none),
),
)
],
),
Divider(
height: 0,
),
Expanded(
flex: 2,
child: Container(
child: widget.body,
),
)
],
),
);
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.