|
|
@@ -365,27 +365,13 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
children: [
|
|
|
Row(
|
|
|
children: [
|
|
|
- Visibility(
|
|
|
- visible: item.isExample.isTrue,
|
|
|
- child: Container(
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 6).w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: '#DFE4FC'.toColor(),
|
|
|
- borderRadius: BorderRadius.circular(4),
|
|
|
- ),
|
|
|
- child: Text(
|
|
|
- StringName.homeTalkExample.tr,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp, color: ColorName.colorPrimary),
|
|
|
- )),
|
|
|
- ),
|
|
|
- SizedBox(width: 6.w),
|
|
|
+ _buildTag(item),
|
|
|
Text(item.title.value.orEmpty,
|
|
|
maxLines: 1,
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
style: TextStyle(
|
|
|
fontSize: 15.sp,
|
|
|
- color: ColorName.colorPrimary,
|
|
|
+ color: ColorName.primaryTextColor,
|
|
|
fontWeight: FontWeight.bold))
|
|
|
],
|
|
|
),
|
|
|
@@ -418,6 +404,29 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ Widget _buildTag(TalkBean item) {
|
|
|
+ return Visibility(
|
|
|
+ visible: item.isExample.isTrue ||
|
|
|
+ item.status.value == TalkStatus.analysing ||
|
|
|
+ item.status.value == TalkStatus.waitAnalysis,
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(right: 6.w),
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 3).w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#DFE4FC'.toColor(),
|
|
|
+ borderRadius: BorderRadius.circular(4),
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ textAlign: TextAlign.center,
|
|
|
+ (item.isExample.isTrue)
|
|
|
+ ? StringName.homeTalkExample.tr
|
|
|
+ : StringName.analysis.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ height: 1.0, fontSize: 12.sp, color: ColorName.colorPrimary),
|
|
|
+ )),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
Widget buildTitle(String titleName, VoidCallback? onTap) {
|
|
|
return Padding(
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12).w,
|