|
|
@@ -11,6 +11,7 @@ import '../../../data/consts/Constants.dart';
|
|
|
import '../../../resource/assets.gen.dart';
|
|
|
import '../../../resource/colors.gen.dart';
|
|
|
import '../../../resource/string.gen.dart';
|
|
|
+import '../common_view.dart';
|
|
|
import 'controller.dart';
|
|
|
|
|
|
class HomeTalkView extends BasePage<HomeTalkController> {
|
|
|
@@ -49,34 +50,37 @@ class HomeTalkView extends BasePage<HomeTalkController> {
|
|
|
|
|
|
Widget _buildSeeMoreView() {
|
|
|
return Obx(() {
|
|
|
- return Visibility(
|
|
|
- visible: controller.talkList.isNotEmpty,
|
|
|
- child: Container(
|
|
|
+ if (controller.talkList.isNotEmpty) {
|
|
|
+ return Container(
|
|
|
alignment: Alignment.center,
|
|
|
padding: EdgeInsets.only(
|
|
|
top: 16.w, bottom: 100.w + Constants.bottomBarHeight),
|
|
|
- child: RichText(
|
|
|
- text: TextSpan(
|
|
|
- text: StringName.homeTalkSeeMoreTxt.tr,
|
|
|
- style: TextStyle(
|
|
|
- color: ColorName.secondaryTextColor, fontSize: 12.sp),
|
|
|
- children: <TextSpan>[
|
|
|
- TextSpan(
|
|
|
- text: StringName.homeTalkAll.tr,
|
|
|
- style: TextStyle(
|
|
|
- color: ColorName.colorPrimary, fontSize: 12.sp),
|
|
|
- recognizer: TapGestureRecognizer()
|
|
|
- ..onTap = () {
|
|
|
- controller.onGoTalkSeeAll();
|
|
|
- }),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
+ child: _buildMoreView(),
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return homeEmptyView(StringName.homeTalkNoData.tr, _buildMoreView());
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ Widget _buildMoreView() {
|
|
|
+ return RichText(
|
|
|
+ text: TextSpan(
|
|
|
+ text: StringName.homeTalkSeeMoreTxt.tr,
|
|
|
+ style: TextStyle(color: ColorName.secondaryTextColor, fontSize: 12.sp),
|
|
|
+ children: <TextSpan>[
|
|
|
+ TextSpan(
|
|
|
+ text: StringName.homeTalkAll.tr,
|
|
|
+ style: TextStyle(color: ColorName.colorPrimary, fontSize: 12.sp),
|
|
|
+ recognizer: TapGestureRecognizer()
|
|
|
+ ..onTap = () {
|
|
|
+ controller.onGoTalkSeeAll();
|
|
|
+ }),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
Widget _buildTalkView(TalkBean item) {
|
|
|
return _buildTalkItem(item, onLongPressStart: (details) {
|
|
|
controller.onLongPressTalkItem(item, details);
|