import 'package:flutter/material.dart'; import 'package:huixiang/view_widget/message_item.dart'; class RealTimeInfoPage extends StatefulWidget { @override State createState() { return _RealTimeInfoPage(); } } class _RealTimeInfoPage extends State { @override Widget build(BuildContext context) { return Container( child: ListView.builder( itemCount: 10, itemBuilder: (context, position) { return Container( margin: EdgeInsets.only( left: 16, right: 16, top: position == 0 ? 32 : 8, bottom: 8), padding: EdgeInsets.only(top: 16, bottom: 16), decoration: BoxDecoration( color: Colors.white, boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0) ], borderRadius: BorderRadius.all(Radius.circular(8))), child: MessageItem(0), ); }), ); } }