buildItem function

Widget buildItem(
  1. int index,
  2. List<String> sourceList
)

Implementation

Widget buildItem(int index, List<String> sourceList) {
  Widget view = Container();
  if (index == 0) {
    view = Container(
        alignment: Alignment.center,
        child: Text("无", style: TextStyle(color: Colors.black)));
  } else if (index > 0 && index < sourceList.length - 1) {
    view = Center(
        child: Image.file(
      File(sourceList[index]),
      width: 68,
      height: 68,
      fit: BoxFit.fill,
    ));
  } else if (index == sourceList.length - 1) {
    view = Container(
      child: Icon(NEMeetingIconFont.icon_unfold, color: UIColors.black_333333),
    );
  }
  return view;
}