【发布时间】:2019-06-11 11:58:42
【问题描述】:
我使用 AnimatedList 但在项目中使用了阴影,我的项目如下面的代码,我需要一些帮助!!!
class TextSentMessage extends StatelessWidget {
final String textMessage;
final Widget buildStatus;
TextSentMessage({this.textMessage, this.buildStatus});
@override
Widget build(BuildContext context) {
print('message 4 : ' + textMessage);
return Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Stack(
overflow: Overflow.visible,
children: <Widget>[
Container(
padding: EdgeInsets.only(
top: 10.0, bottom: 10.0, left: 20.0, right: 15.0),
margin: EdgeInsets.all(5.0),
constraints: BoxConstraints(
maxWidth: 0.7 * MediaQuery.of(context).size.width,
minWidth: 50.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 0, 117, 255),
boxShadow: [
BoxShadow(
color: black_7, blurRadius: 64, offset: Offset(0, 7))
],
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
bottomRight: Radius.circular(6),
bottomLeft: Radius.circular(20)),
),
child: Text(textMessage,
textAlign: TextAlign.right,
style: TextStyle(
fontFamily: 'UTM Avo',
fontSize: 15.0,
color: Colors.white))),
],
),
buildStatus
],
);
}
}
这是我使用 ListView.builder :https://i.imgur.com/4LVXOOw.jpg
这是我使用的 AnimatedList :https://i.imgur.com/bQ3ocL1.jpg
【问题讨论】:
标签: flutter flutter-layout flutter-animation