|
|
@@ -163,80 +163,83 @@ class FilesPage extends BasePage<FilesController> {
|
|
|
}
|
|
|
|
|
|
Widget _buildFileItem(BuildContext context, int index) {
|
|
|
- TalkBean? talkBean = controller.talkList[index].value;
|
|
|
- if (talkBean == null) {
|
|
|
- return Container();
|
|
|
- }
|
|
|
- return Padding(
|
|
|
- padding: EdgeInsets.only(bottom: 8.w),
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- TalkPage.start(talkBean);
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Colors.white,
|
|
|
- borderRadius: BorderRadius.circular(8.w),
|
|
|
- ),
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 14.w),
|
|
|
- child: Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Image(
|
|
|
- image: (talkBean.status == TalkStatus.analysing ||
|
|
|
- talkBean.status == TalkStatus.waitAnalysis)
|
|
|
- ? Assets.images.iconTalkAnalysis.provider()
|
|
|
- : Assets.images.iconFilesFile.provider(),
|
|
|
- width: 28.w,
|
|
|
- height: 32.w),
|
|
|
- Expanded(
|
|
|
- child: Padding(
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 8.w),
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Text(talkBean.title.orEmpty,
|
|
|
- maxLines: 1,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 14.sp,
|
|
|
- color: ColorName.primaryTextColor,
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
- Text(talkBean.summary.orEmpty,
|
|
|
- maxLines: 2,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: talkBean.status == TalkStatus.analysisFail
|
|
|
- ? "#F5574E".toColor()
|
|
|
- : ColorName.secondaryTextColor)),
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(top: 6.w),
|
|
|
- child: Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
- children: [
|
|
|
- Text(talkBean.duration.toFormattedDuration(),
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.tertiaryTextColor)),
|
|
|
- Text(" | ",
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.tertiaryTextColor,
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
- Text(talkBean.createTime.orEmpty,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.tertiaryTextColor)),
|
|
|
- ],
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- )),
|
|
|
- ],
|
|
|
+ return Obx(() {
|
|
|
+ TalkBean? talkBean = controller.talkList[index].value;
|
|
|
+ if (talkBean == null) {
|
|
|
+ return Container();
|
|
|
+ }
|
|
|
+ return Padding(
|
|
|
+ padding: EdgeInsets.only(bottom: 8.w),
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ TalkPage.start(talkBean);
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ borderRadius: BorderRadius.circular(8.w),
|
|
|
+ ),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 14.w),
|
|
|
+ child: Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Image(
|
|
|
+ image: (talkBean.status == TalkStatus.analysing ||
|
|
|
+ talkBean.status == TalkStatus.waitAnalysis)
|
|
|
+ ? Assets.images.iconTalkAnalysis.provider()
|
|
|
+ : Assets.images.iconFilesFile.provider(),
|
|
|
+ width: 28.w,
|
|
|
+ height: 32.w),
|
|
|
+ Expanded(
|
|
|
+ child: Padding(
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 8.w),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Text(talkBean.title.orEmpty,
|
|
|
+ maxLines: 1,
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.sp,
|
|
|
+ color: ColorName.primaryTextColor,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ Text(talkBean.summary.orEmpty,
|
|
|
+ maxLines: 2,
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color:
|
|
|
+ talkBean.status == TalkStatus.analysisFail
|
|
|
+ ? "#F5574E".toColor()
|
|
|
+ : ColorName.secondaryTextColor)),
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(top: 6.w),
|
|
|
+ child: Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ Text(talkBean.duration.toFormattedDuration(),
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.tertiaryTextColor)),
|
|
|
+ Text(" | ",
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.tertiaryTextColor,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ Text(talkBean.createTime.orEmpty,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: ColorName.tertiaryTextColor)),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- ));
|
|
|
+ ));
|
|
|
+ });
|
|
|
}
|
|
|
}
|