|
|
@@ -15,7 +15,9 @@ import 'package:get/get_core/src/get_main.dart';
|
|
|
|
|
|
import '../../data/bean/talks.dart';
|
|
|
import '../../resource/assets.gen.dart';
|
|
|
+import '../../resource/string.gen.dart';
|
|
|
import '../../router/app_pages.dart';
|
|
|
+import '../../utils/common_style.dart';
|
|
|
|
|
|
class TalkPage extends BasePage<TalkController> {
|
|
|
TalkPage({super.key});
|
|
|
@@ -101,10 +103,8 @@ class TalkPage extends BasePage<TalkController> {
|
|
|
color: const Color(0xFFf6f6f6),
|
|
|
indent: 12.w,
|
|
|
endIndent: 12.w),
|
|
|
- Expanded(
|
|
|
- child: TabBarView(
|
|
|
- children: controller.pages,
|
|
|
- ))
|
|
|
+ SizedBox(height: 8.h),
|
|
|
+ buildTalkContentView()
|
|
|
],
|
|
|
)))
|
|
|
],
|
|
|
@@ -131,4 +131,108 @@ class TalkPage extends BasePage<TalkController> {
|
|
|
),
|
|
|
));
|
|
|
}
|
|
|
+
|
|
|
+ Widget buildTalkContentView() {
|
|
|
+ return Obx(() {
|
|
|
+ if (controller.analyseStatus.value == TalkStatus.notAnalysis) {
|
|
|
+ if (controller.isShowElectricLow.value) {
|
|
|
+ return buildElectricLowView();
|
|
|
+ } else {
|
|
|
+ return buildNotAnalysisView();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return Expanded(
|
|
|
+ child: TabBarView(
|
|
|
+ children: controller.pages,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget buildNotAnalysisView() {
|
|
|
+ return SizedBox(
|
|
|
+ width: double.infinity,
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 119.h),
|
|
|
+ SizedBox(
|
|
|
+ width: 100.w,
|
|
|
+ height: 100.w,
|
|
|
+ child: Assets.images.iconTalkSummaryUnanalyzed.image()),
|
|
|
+ SizedBox(height: 4.h),
|
|
|
+ Text(StringName.talkUnAnalyzed.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 15.sp, color: ColorName.primaryTextColor)),
|
|
|
+ SizedBox(height: 2.h),
|
|
|
+ Text(StringName.talkUnAnalyzedTips.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp, color: ColorName.secondaryTextColor)),
|
|
|
+ SizedBox(height: 24.h),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.checkCanAnalyze();
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ decoration: getPrimaryBtnDecoration(8),
|
|
|
+ width: 240.w,
|
|
|
+ height: 48.w,
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ StringName.talkAnalyzedBtnTxt.tr,
|
|
|
+ style: TextStyle(fontSize: 16.sp, color: ColorName.white),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget buildElectricLowView() {
|
|
|
+ return Container(
|
|
|
+ color: const Color(0xFFDFE4FC),
|
|
|
+ padding: EdgeInsets.only(left: 16.w, right: 12.w, top: 8.h, bottom: 8.h),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ width: 46.w,
|
|
|
+ height: 56.w,
|
|
|
+ child: Assets.images.iconTalkElectricLow.image()),
|
|
|
+ SizedBox(width: 10.w),
|
|
|
+ IntrinsicHeight(
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ width: 90.w,
|
|
|
+ height: 21.w,
|
|
|
+ child: Assets.images.iconTalkElectricLowTxt.image()),
|
|
|
+ SizedBox(width: 1.w),
|
|
|
+ Text(StringName.talkElectricLow.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp, color: ColorName.secondaryTextColor)),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ const Spacer(),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.goElectricStore();
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ decoration: getPrimaryBtnDecoration(8),
|
|
|
+ width: 100.w,
|
|
|
+ height: 36.w,
|
|
|
+ child: Center(
|
|
|
+ child: Text(StringName.talkGoStore.tr,
|
|
|
+ style:
|
|
|
+ TextStyle(fontSize: 16.sp, color: ColorName.white)),
|
|
|
+ )),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|