|
|
@@ -70,24 +70,24 @@ class TalkPage extends BasePage<TalkController> {
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
- child: Obx(() {
|
|
|
- return DefaultTabController(
|
|
|
- initialIndex: controller.defaultIndex,
|
|
|
- length: controller.tabBeans.length,
|
|
|
- child: Stack(
|
|
|
- children: [
|
|
|
- Obx(() {
|
|
|
- return controller.temporaryController != null
|
|
|
- ? DWebViewWidget(
|
|
|
- controller: controller.temporaryController!)
|
|
|
- : const SizedBox.shrink();
|
|
|
- }),
|
|
|
- _buildTalkContentView(),
|
|
|
- buildBottomView()
|
|
|
- ],
|
|
|
- ),
|
|
|
- );
|
|
|
- }),
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Obx(() {
|
|
|
+ return controller.temporaryController != null
|
|
|
+ ? DWebViewWidget(controller: controller.temporaryController!)
|
|
|
+ : const SizedBox.shrink();
|
|
|
+ }),
|
|
|
+ Obx(() {
|
|
|
+ return controller.isInitializedView.value
|
|
|
+ ? DefaultTabController(
|
|
|
+ initialIndex: controller.defaultIndex,
|
|
|
+ length: controller.tabBeans.length,
|
|
|
+ child: _buildTalkContentView())
|
|
|
+ : const SizedBox.shrink();
|
|
|
+ }),
|
|
|
+ buildBottomView()
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -142,25 +142,23 @@ class TalkPage extends BasePage<TalkController> {
|
|
|
if (!controller.isEditModel) {
|
|
|
return Column(
|
|
|
children: [
|
|
|
- controller.tabBeans.isEmpty
|
|
|
- ? const SizedBox.shrink()
|
|
|
- : TabBar(
|
|
|
- labelStyle:
|
|
|
- TextStyle(fontSize: 16.sp, fontWeight: FontWeight.bold),
|
|
|
- unselectedLabelStyle: TextStyle(fontSize: 14.sp),
|
|
|
- labelColor: ColorName.primaryTextColor,
|
|
|
- unselectedLabelColor: ColorName.secondaryTextColor,
|
|
|
- labelPadding: EdgeInsets.only(top: 4.h),
|
|
|
- dividerHeight: 0,
|
|
|
- splashFactory: NoSplash.splashFactory,
|
|
|
- indicator: FixedSizeTabIndicator(
|
|
|
- width: 16.w,
|
|
|
- height: 3.w,
|
|
|
- radius: 3,
|
|
|
- color: ColorName.colorPrimary),
|
|
|
- tabs: controller.tabBeans
|
|
|
- .map((bean) => Tab(text: bean.title))
|
|
|
- .toList()),
|
|
|
+ TabBar(
|
|
|
+ labelStyle:
|
|
|
+ TextStyle(fontSize: 16.sp, fontWeight: FontWeight.bold),
|
|
|
+ unselectedLabelStyle: TextStyle(fontSize: 14.sp),
|
|
|
+ labelColor: ColorName.primaryTextColor,
|
|
|
+ unselectedLabelColor: ColorName.secondaryTextColor,
|
|
|
+ labelPadding: EdgeInsets.only(top: 4.h),
|
|
|
+ dividerHeight: 0,
|
|
|
+ splashFactory: NoSplash.splashFactory,
|
|
|
+ indicator: FixedSizeTabIndicator(
|
|
|
+ width: 16.w,
|
|
|
+ height: 3.w,
|
|
|
+ radius: 3,
|
|
|
+ color: ColorName.colorPrimary),
|
|
|
+ tabs: controller.tabBeans
|
|
|
+ .map((bean) => Tab(text: bean.title))
|
|
|
+ .toList()),
|
|
|
SizedBox(height: 6.h),
|
|
|
Divider(height: 1, color: '#F2F4F9'.color)
|
|
|
],
|
|
|
@@ -193,17 +191,13 @@ class TalkPage extends BasePage<TalkController> {
|
|
|
|
|
|
Widget buildTabContentView() {
|
|
|
return Expanded(
|
|
|
- child: Obx(() {
|
|
|
- return controller.pages.isEmpty
|
|
|
- ? const SizedBox.shrink()
|
|
|
- : TabBarView(
|
|
|
- physics: controller.isEditModel ||
|
|
|
- controller.checkTabBean.value?.isDisallowScroll == true
|
|
|
- ? const NeverScrollableScrollPhysics()
|
|
|
- : null,
|
|
|
- children: controller.pages,
|
|
|
- );
|
|
|
- }),
|
|
|
+ child: TabBarView(
|
|
|
+ physics: controller.isEditModel ||
|
|
|
+ controller.checkTabBean.value?.isDisallowScroll == true
|
|
|
+ ? const NeverScrollableScrollPhysics()
|
|
|
+ : null,
|
|
|
+ children: controller.pages,
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|