setListView method
dynamic
setListView()
Implementation
setListView() {
return Obx(() => Column(
children: fileList.map((e) {
var pathName = e.path.split("/").last;
final fileType = pathName.split(".").last;
return Container(
margin: itemMargin,
decoration: itemDecoration,
padding: itemPadding,
child: Row(
children: [
HXUtils.getImageIcon(fileType),
Expanded(
child: Container(
margin: EdgeInsets.only(right: 5.w, left: 10.w),
child: Text(
e.path.split("/").last,
softWrap: true,
overflow: TextOverflow.visible,
),
),
),
IconButton(
onPressed: () {
fileList.remove(e);
callbackFile(fileList);
},
style: ButtonStyle(
padding: WidgetStatePropertyAll(
EdgeInsets.symmetric(horizontal: 10.w, vertical: 2.h),
),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
minimumSize: WidgetStatePropertyAll(Size(0, 0)),
),
icon: Image.asset(
Assets.imagesCloseRoundIcon,
width: 18.w,
height: 18.w,
package: "hx_base",
),
),
],
),
);
}).toList(),
));
}