fix:切换播放问题
This commit is contained in:
parent
96d6ef8f75
commit
0fac8844dc
@ -1,5 +1,6 @@
|
|||||||
import 'package:easy_refresh/easy_refresh.dart';
|
import 'package:easy_refresh/easy_refresh.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_kinetra/kt_pages/kt_main_page/view.dart';
|
||||||
import 'package:flutter_kinetra/kt_utils/kt_string_extend.dart';
|
import 'package:flutter_kinetra/kt_utils/kt_string_extend.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -28,6 +29,7 @@ class _KtExplorePageState extends State<KtExplorePage>
|
|||||||
super.build(context);
|
super.build(context);
|
||||||
return GetBuilder<KtExploreLogic>(
|
return GetBuilder<KtExploreLogic>(
|
||||||
builder: (ctrl) {
|
builder: (ctrl) {
|
||||||
|
if(Get.find<KtMainLogic>().curIndex != 1) return Container();
|
||||||
if (state.loadStatus == KtLoadStatusType.loadNoData ||
|
if (state.loadStatus == KtLoadStatusType.loadNoData ||
|
||||||
state.loadStatus == KtLoadStatusType.loadFailed) {
|
state.loadStatus == KtLoadStatusType.loadFailed) {
|
||||||
return KtStatusWidget(
|
return KtStatusWidget(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_kinetra/kt_pages/kt_actor/kt_actor_page.dart';
|
import 'package:flutter_kinetra/kt_pages/kt_actor/kt_actor_page.dart';
|
||||||
|
import 'package:flutter_kinetra/kt_pages/kt_explore/logic.dart';
|
||||||
import 'package:flutter_kinetra/kt_utils/kt_string_extend.dart';
|
import 'package:flutter_kinetra/kt_utils/kt_string_extend.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -110,8 +111,13 @@ class _KtMainPageState extends State<KtMainPage>
|
|||||||
_currentIndex = index;
|
_currentIndex = index;
|
||||||
logic.curIndex = index;
|
logic.curIndex = index;
|
||||||
_controller.jumpToPage(index);
|
_controller.jumpToPage(index);
|
||||||
|
if (index == 3) {
|
||||||
final myListLogic = Get.put(MyListLogic());
|
final myListLogic = Get.put(MyListLogic());
|
||||||
myListLogic.initData();
|
myListLogic.initData();
|
||||||
|
} else if (index == 1) {
|
||||||
|
final exploreLogic = Get.put(KtExploreLogic());
|
||||||
|
exploreLogic.update();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
..._tabsTitle.map(
|
..._tabsTitle.map(
|
||||||
@ -139,7 +145,7 @@ class _KtMainPageState extends State<KtMainPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user