|
|
@@ -69,13 +69,7 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
),
|
|
|
),
|
|
|
buildTalkTodoTitle(),
|
|
|
- Obx(() {
|
|
|
- return SliverList.builder(
|
|
|
- itemBuilder: _builderAgendaItem,
|
|
|
- itemCount: controller.agendaList.length >= 10
|
|
|
- ? 10
|
|
|
- : controller.agendaList.length);
|
|
|
- }),
|
|
|
+ buildTalkTodoContent(),
|
|
|
buildSeeMoreView(),
|
|
|
],
|
|
|
),
|
|
|
@@ -123,11 +117,10 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
child: _buildHeaderCard(
|
|
|
StringName.homeTalkImportAudio.tr,
|
|
|
StringName.homeTalkAnalyzeLocalAudio.tr,
|
|
|
- Assets.images.iconHomeTalkSelectCard.image().image,
|
|
|
- [
|
|
|
- "#5869ED".toColor(),
|
|
|
- "#6E8AF7".toColor(),
|
|
|
- ], onTap: () {
|
|
|
+ Assets.images.iconHomeTalkSelectCard.image().image, [
|
|
|
+ "#5869ED".toColor(),
|
|
|
+ "#6E8AF7".toColor(),
|
|
|
+ ], onTap: () {
|
|
|
controller.onPickerAudioFile();
|
|
|
}),
|
|
|
),
|
|
|
@@ -199,24 +192,27 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
|
|
|
SliverToBoxAdapter buildSeeMoreView() {
|
|
|
return SliverToBoxAdapter(
|
|
|
- child: Container(
|
|
|
- alignment: Alignment.center,
|
|
|
- padding: const EdgeInsets.only(top: 12, bottom: 36).w,
|
|
|
- child: RichText(
|
|
|
- text: TextSpan(
|
|
|
- text: StringName.homeTalkTodo1.tr,
|
|
|
- style:
|
|
|
- TextStyle(color: ColorName.secondaryTextColor, fontSize: 12.sp),
|
|
|
- children: <TextSpan>[
|
|
|
- TextSpan(
|
|
|
- text: StringName.homeTalkTodo2.tr,
|
|
|
- style:
|
|
|
- TextStyle(color: ColorName.colorPrimary, fontSize: 12.sp),
|
|
|
- recognizer: TapGestureRecognizer()
|
|
|
- ..onTap = () {
|
|
|
- Get.toNamed(RoutePath.task);
|
|
|
- }),
|
|
|
- ],
|
|
|
+ child: Visibility(
|
|
|
+ visible: controller.agendaList.isNotEmpty,
|
|
|
+ child: Container(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ padding: const EdgeInsets.only(top: 12, bottom: 36).w,
|
|
|
+ child: RichText(
|
|
|
+ text: TextSpan(
|
|
|
+ text: StringName.homeTalkTodo1.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.secondaryTextColor, fontSize: 12.sp),
|
|
|
+ children: <TextSpan>[
|
|
|
+ TextSpan(
|
|
|
+ text: StringName.homeTalkTodo2.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.colorPrimary, fontSize: 12.sp),
|
|
|
+ recognizer: TapGestureRecognizer()
|
|
|
+ ..onTap = () {
|
|
|
+ Get.toNamed(RoutePath.task);
|
|
|
+ }),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -637,4 +633,37 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
controller.requestDelete(item);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ Widget buildTalkTodoContent() {
|
|
|
+ return Obx(() {
|
|
|
+ if (controller.agendaList.isEmpty) {
|
|
|
+ return SliverToBoxAdapter(child: buildAgendaEmptyView(50.h));
|
|
|
+ } else {
|
|
|
+ return SliverList.builder(
|
|
|
+ itemBuilder: _builderAgendaItem,
|
|
|
+ itemCount: controller.agendaList.length >= 10
|
|
|
+ ? 10
|
|
|
+ : controller.agendaList.length);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+Widget buildAgendaEmptyView(double top) {
|
|
|
+ return Container(
|
|
|
+ width: double.infinity,
|
|
|
+ padding: EdgeInsets.symmetric(vertical: top),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ width: 100.w,
|
|
|
+ height: 100.w,
|
|
|
+ child: Assets.images.iconNoTask.image()),
|
|
|
+ SizedBox(height: 4.h),
|
|
|
+ Text(StringName.agendaNoData.tr,
|
|
|
+ style: TextStyle(
|
|
|
+ color: ColorName.secondaryTextColor, fontSize: 14.sp)),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
}
|