mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
@@ -1,4 +1,5 @@
|
|||||||
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
|
||||||
|
import 'package:PiliPlus/utils/parse_string.dart';
|
||||||
|
|
||||||
class CardLiveItem {
|
class CardLiveItem {
|
||||||
int? roomid;
|
int? roomid;
|
||||||
@@ -6,6 +7,7 @@ class CardLiveItem {
|
|||||||
String? uname;
|
String? uname;
|
||||||
String? face;
|
String? face;
|
||||||
String? cover;
|
String? cover;
|
||||||
|
String? systemCover;
|
||||||
String? title;
|
String? title;
|
||||||
int? liveTime;
|
int? liveTime;
|
||||||
String? areaName;
|
String? areaName;
|
||||||
@@ -21,6 +23,7 @@ class CardLiveItem {
|
|||||||
this.uname,
|
this.uname,
|
||||||
this.face,
|
this.face,
|
||||||
this.cover,
|
this.cover,
|
||||||
|
this.systemCover,
|
||||||
this.title,
|
this.title,
|
||||||
this.liveTime,
|
this.liveTime,
|
||||||
this.areaName,
|
this.areaName,
|
||||||
@@ -37,6 +40,7 @@ class CardLiveItem {
|
|||||||
uname: json['uname'] as String?,
|
uname: json['uname'] as String?,
|
||||||
face: json['face'] as String?,
|
face: json['face'] as String?,
|
||||||
cover: json['cover'] as String?,
|
cover: json['cover'] as String?,
|
||||||
|
systemCover: noneNullOrEmptyString(json['system_cover']),
|
||||||
title: json['title'] as String?,
|
title: json['title'] as String?,
|
||||||
liveTime: json['live_time'] as int?,
|
liveTime: json['live_time'] as int?,
|
||||||
areaName: json['area_name'] as String?,
|
areaName: json['area_name'] as String?,
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ class LiveController extends CommonListController with AccountMixin {
|
|||||||
|
|
||||||
final followController = ScrollController();
|
final followController = ScrollController();
|
||||||
|
|
||||||
|
bool showFirstFrame = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void checkIsEnd(int length) {
|
void checkIsEnd(int length) {
|
||||||
if (count != null && length >= count!) {
|
if (count != null && length >= count!) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import 'package:PiliPlus/utils/platform_utils.dart';
|
|||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
|
|
||||||
class LivePage extends StatefulWidget {
|
class LivePage extends StatefulWidget {
|
||||||
const LivePage({super.key});
|
const LivePage({super.key});
|
||||||
@@ -128,6 +129,20 @@ class _LivePageState extends State<LivePage>
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
iconButton(
|
||||||
|
size: 26,
|
||||||
|
iconSize: 18,
|
||||||
|
context: context,
|
||||||
|
tooltip: '切换${controller.showFirstFrame ? '封面' : '首帧'}',
|
||||||
|
icon: controller.showFirstFrame
|
||||||
|
? const Icon(MdiIcons.alphaFBox)
|
||||||
|
: const Icon(MdiIcons.image),
|
||||||
|
onPressed: () {
|
||||||
|
controller.showFirstFrame = !controller.showFirstFrame;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
iconButton(
|
iconButton(
|
||||||
size: 26,
|
size: 26,
|
||||||
iconSize: 16,
|
iconSize: 16,
|
||||||
@@ -224,9 +239,13 @@ class _LivePageState extends State<LivePage>
|
|||||||
if (item is LiveCardList) {
|
if (item is LiveCardList) {
|
||||||
return LiveCardVApp(
|
return LiveCardVApp(
|
||||||
item: item.cardData!.smallCardV1!,
|
item: item.cardData!.smallCardV1!,
|
||||||
|
showFirstFrame: controller.showFirstFrame,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return LiveCardVApp(item: item);
|
return LiveCardVApp(
|
||||||
|
item: item,
|
||||||
|
showFirstFrame: controller.showFirstFrame,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: response.length,
|
itemCount: response.length,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ import 'package:flutter/material.dart' hide LayoutBuilder;
|
|||||||
// 视频卡片 - 垂直布局
|
// 视频卡片 - 垂直布局
|
||||||
class LiveCardVApp extends StatelessWidget {
|
class LiveCardVApp extends StatelessWidget {
|
||||||
final CardLiveItem item;
|
final CardLiveItem item;
|
||||||
|
final bool showFirstFrame;
|
||||||
|
|
||||||
const LiveCardVApp({
|
const LiveCardVApp({
|
||||||
super.key,
|
super.key,
|
||||||
required this.item,
|
required this.item,
|
||||||
|
this.showFirstFrame = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -40,7 +42,9 @@ class LiveCardVApp extends StatelessWidget {
|
|||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
src: item.cover!,
|
src: showFirstFrame
|
||||||
|
? (item.systemCover ?? item.cover)
|
||||||
|
: item.cover,
|
||||||
width: maxWidth,
|
width: maxWidth,
|
||||||
height: maxHeight,
|
height: maxHeight,
|
||||||
type: .emote,
|
type: .emote,
|
||||||
|
|||||||
@@ -4,16 +4,19 @@ import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
|||||||
import 'package:PiliPlus/models_new/live/live_area_list/area_list.dart';
|
import 'package:PiliPlus/models_new/live/live_area_list/area_list.dart';
|
||||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||||
import 'package:PiliPlus/utils/accounts.dart';
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
|
import 'package:flutter/material.dart' show TabController;
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
class LiveAreaController
|
class LiveAreaController extends CommonListController<List<AreaList>?, AreaList>
|
||||||
extends CommonListController<List<AreaList>?, AreaList> {
|
with GetSingleTickerProviderStateMixin {
|
||||||
late final isLogin = Accounts.main.isLogin;
|
late final isLogin = Accounts.main.isLogin;
|
||||||
|
|
||||||
late final isEditing = false.obs;
|
late final isEditing = false.obs;
|
||||||
late final favInfo = {};
|
late final favInfo = {};
|
||||||
|
|
||||||
|
TabController? tabController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@@ -31,6 +34,16 @@ class LiveAreaController
|
|||||||
return super.onRefresh();
|
return super.onRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool customHandleResponse(bool isRefresh, Success<List<AreaList>?> response) {
|
||||||
|
assert(tabController == null);
|
||||||
|
final length = response.response?.length;
|
||||||
|
if (length != null && length != 0) {
|
||||||
|
tabController = TabController(length: length, vsync: this);
|
||||||
|
}
|
||||||
|
return super.customHandleResponse(isRefresh, response);
|
||||||
|
}
|
||||||
|
|
||||||
Rx<LoadingState<List<AreaItem>>> favState =
|
Rx<LoadingState<List<AreaItem>>> favState =
|
||||||
LoadingState<List<AreaItem>>.loading().obs;
|
LoadingState<List<AreaItem>>.loading().obs;
|
||||||
|
|
||||||
@@ -65,4 +78,11 @@ class LiveAreaController
|
|||||||
isEditing.value = !isEditing.value;
|
isEditing.value = !isEditing.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
tabController?.dispose();
|
||||||
|
tabController = null;
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,82 +80,78 @@ class _LiveAreaPageState extends State<LiveAreaPage> {
|
|||||||
Loading() => const SizedBox.shrink(),
|
Loading() => const SizedBox.shrink(),
|
||||||
Success(:final response) =>
|
Success(:final response) =>
|
||||||
response != null && response.isNotEmpty
|
response != null && response.isNotEmpty
|
||||||
? DefaultTabController(
|
? Column(
|
||||||
length: response.length,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Column(
|
children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
TabBar(
|
||||||
children: [
|
isScrollable: true,
|
||||||
TabBar(
|
tabAlignment: TabAlignment.start,
|
||||||
isScrollable: true,
|
controller: _controller.tabController,
|
||||||
tabAlignment: TabAlignment.start,
|
tabs: response.map((e) => Tab(text: e.name)).toList(),
|
||||||
tabs: response.map((e) => Tab(text: e.name)).toList(),
|
),
|
||||||
),
|
Expanded(
|
||||||
Expanded(
|
child: tabBarView(
|
||||||
child: tabBarView(
|
controller: _controller.tabController,
|
||||||
children: response
|
children: response
|
||||||
.map(
|
.map(
|
||||||
(e) => KeepAliveWrapper(
|
(e) => KeepAliveWrapper(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (e.areaList.isNullOrEmpty) {
|
if (e.areaList.isNullOrEmpty) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 12,
|
top: 12,
|
||||||
bottom: bottom + 100,
|
bottom: bottom + 100,
|
||||||
),
|
),
|
||||||
gridDelegate:
|
gridDelegate:
|
||||||
const SliverGridDelegateWithMaxCrossAxisExtent(
|
const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent: 100,
|
maxCrossAxisExtent: 100,
|
||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 10,
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 10,
|
||||||
mainAxisExtent: 80,
|
mainAxisExtent: 80,
|
||||||
),
|
),
|
||||||
itemCount: e.areaList!.length,
|
itemCount: e.areaList!.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final item = e.areaList![index];
|
final item = e.areaList![index];
|
||||||
return _tagItem(
|
return _tagItem(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
item: item,
|
item: item,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// success
|
// success
|
||||||
bool? isFav =
|
bool? isFav =
|
||||||
_controller.favInfo[item.id];
|
_controller.favInfo[item.id];
|
||||||
if (isFav == true) {
|
if (isFav == true) {
|
||||||
_controller.favInfo[item.id] =
|
_controller.favInfo[item.id] = false;
|
||||||
false;
|
_controller.favState
|
||||||
|
..value.data.remove(item)
|
||||||
|
..refresh();
|
||||||
|
(context as Element).markNeedsBuild();
|
||||||
|
} else {
|
||||||
|
// check
|
||||||
|
if (_controller
|
||||||
|
.favState
|
||||||
|
.value
|
||||||
|
.isSuccess) {
|
||||||
|
_controller.favInfo[item.id] = true;
|
||||||
_controller.favState
|
_controller.favState
|
||||||
..value.data.remove(item)
|
..value.data.add(item)
|
||||||
..refresh();
|
..refresh();
|
||||||
(context as Element)
|
(context as Element)
|
||||||
.markNeedsBuild();
|
.markNeedsBuild();
|
||||||
} else {
|
|
||||||
// check
|
|
||||||
if (_controller
|
|
||||||
.favState
|
|
||||||
.value
|
|
||||||
.isSuccess) {
|
|
||||||
_controller.favInfo[item.id] =
|
|
||||||
true;
|
|
||||||
_controller.favState
|
|
||||||
..value.data.add(item)
|
|
||||||
..refresh();
|
|
||||||
(context as Element)
|
|
||||||
.markNeedsBuild();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
);
|
},
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
)
|
),
|
||||||
.toList(),
|
)
|
||||||
),
|
.toList(),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
)
|
)
|
||||||
: scrollErrorWidget(onReload: _controller.onReload),
|
: scrollErrorWidget(onReload: _controller.onReload),
|
||||||
Error(:final errMsg) => scrollErrorWidget(
|
Error(:final errMsg) => scrollErrorWidget(
|
||||||
@@ -192,9 +188,7 @@ class _LiveAreaPageState extends State<LiveAreaPage> {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
if (response != null && response.isNotEmpty) ...[
|
if (response != null && response.isNotEmpty) ...[
|
||||||
SortableWrap(
|
SortableWrap(
|
||||||
onSortStart: (index) {
|
onSortStart: (index) => _controller.isEditing.value = true,
|
||||||
_controller.isEditing.value = true;
|
|
||||||
},
|
|
||||||
onSorted: (int oldIndex, int newIndex) {
|
onSorted: (int oldIndex, int newIndex) {
|
||||||
response.insert(newIndex, response.removeAt(oldIndex));
|
response.insert(newIndex, response.removeAt(oldIndex));
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,10 +17,12 @@ class LiveAreaChildPage extends StatefulWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.areaId,
|
required this.areaId,
|
||||||
required this.parentAreaId,
|
required this.parentAreaId,
|
||||||
|
required this.showFirstFrame,
|
||||||
});
|
});
|
||||||
|
|
||||||
final dynamic areaId;
|
final dynamic areaId;
|
||||||
final dynamic parentAreaId;
|
final dynamic parentAreaId;
|
||||||
|
final bool showFirstFrame;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<LiveAreaChildPage> createState() => _LiveAreaChildPageState();
|
State<LiveAreaChildPage> createState() => _LiveAreaChildPageState();
|
||||||
@@ -120,7 +122,10 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
|||||||
if (index == response.length - 1) {
|
if (index == response.length - 1) {
|
||||||
_controller.onLoadMore();
|
_controller.onLoadMore();
|
||||||
}
|
}
|
||||||
return LiveCardVApp(item: response[index]);
|
return LiveCardVApp(
|
||||||
|
item: response[index],
|
||||||
|
showFirstFrame: widget.showFirstFrame,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: response.length,
|
itemCount: response.length,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,19 @@ import 'package:PiliPlus/http/live.dart';
|
|||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
||||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||||
|
import 'package:flutter/material.dart' show TabController;
|
||||||
|
import 'package:get/get_state_manager/src/rx_flutter/rx_ticket_provider_mixin.dart';
|
||||||
|
|
||||||
class LiveAreaDetailController
|
class LiveAreaDetailController
|
||||||
extends CommonListController<List<AreaItem>?, AreaItem> {
|
extends CommonListController<List<AreaItem>?, AreaItem>
|
||||||
|
with GetSingleTickerProviderStateMixin {
|
||||||
LiveAreaDetailController(this.areaId, this.parentAreaId);
|
LiveAreaDetailController(this.areaId, this.parentAreaId);
|
||||||
final dynamic areaId;
|
final dynamic areaId;
|
||||||
final dynamic parentAreaId;
|
final dynamic parentAreaId;
|
||||||
|
|
||||||
late int initialIndex = 0;
|
TabController? tabController;
|
||||||
|
|
||||||
|
bool showFirstFrame = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
@@ -22,7 +27,13 @@ class LiveAreaDetailController
|
|||||||
@override
|
@override
|
||||||
List<AreaItem>? getDataList(List<AreaItem>? response) {
|
List<AreaItem>? getDataList(List<AreaItem>? response) {
|
||||||
if (response != null && response.isNotEmpty) {
|
if (response != null && response.isNotEmpty) {
|
||||||
initialIndex = max(0, response.indexWhere((e) => e.id == areaId));
|
assert(tabController == null);
|
||||||
|
final initialIndex = max(0, response.indexWhere((e) => e.id == areaId));
|
||||||
|
tabController = TabController(
|
||||||
|
length: response.length,
|
||||||
|
initialIndex: initialIndex,
|
||||||
|
vsync: this,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
@@ -30,4 +41,11 @@ class LiveAreaDetailController
|
|||||||
@override
|
@override
|
||||||
Future<LoadingState<List<AreaItem>?>> customGetData() =>
|
Future<LoadingState<List<AreaItem>?>> customGetData() =>
|
||||||
LiveHttp.liveRoomAreaList(parentid: parentAreaId);
|
LiveHttp.liveRoomAreaList(parentid: parentAreaId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
tabController?.dispose();
|
||||||
|
tabController = null;
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import 'package:PiliPlus/pages/live_area_detail/controller.dart';
|
|||||||
import 'package:PiliPlus/pages/live_search/view.dart';
|
import 'package:PiliPlus/pages/live_search/view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
|
|
||||||
class LiveAreaDetailPage extends StatefulWidget {
|
class LiveAreaDetailPage extends StatefulWidget {
|
||||||
const LiveAreaDetailPage({
|
const LiveAreaDetailPage({
|
||||||
@@ -73,71 +74,81 @@ class _LiveAreaDetailPageState extends State<LiveAreaDetailPage> {
|
|||||||
Loading() => const SizedBox.shrink(),
|
Loading() => const SizedBox.shrink(),
|
||||||
Success(:final response) =>
|
Success(:final response) =>
|
||||||
response != null && response.isNotEmpty
|
response != null && response.isNotEmpty
|
||||||
? DefaultTabController(
|
? Column(
|
||||||
initialIndex: _controller.initialIndex,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
length: response.length,
|
children: [
|
||||||
child: Builder(
|
Row(
|
||||||
builder: (context) {
|
children: [
|
||||||
return Column(
|
Expanded(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: TabBar(
|
||||||
children: [
|
dividerHeight: 0,
|
||||||
Row(
|
isScrollable: true,
|
||||||
children: [
|
tabAlignment: TabAlignment.start,
|
||||||
Expanded(
|
dividerColor: Colors.transparent,
|
||||||
child: TabBar(
|
controller: _controller.tabController,
|
||||||
dividerHeight: 0,
|
tabs: response
|
||||||
dividerColor: Colors.transparent,
|
.map((e) => Tab(text: e.name ?? ''))
|
||||||
isScrollable: true,
|
.toList(),
|
||||||
tabAlignment: TabAlignment.start,
|
onTap: (index) {
|
||||||
tabs: response
|
try {
|
||||||
.map((e) => Tab(text: e.name ?? ''))
|
if (!_controller.tabController!.indexIsChanging) {
|
||||||
.toList(),
|
final item = response[index];
|
||||||
onTap: (index) {
|
Get.find<LiveAreaChildController>(
|
||||||
try {
|
tag: '${item.id}${item.parentId}',
|
||||||
if (!DefaultTabController.of(
|
).animateToTop();
|
||||||
context,
|
}
|
||||||
).indexIsChanging) {
|
} catch (_) {}
|
||||||
final item = response[index];
|
},
|
||||||
Get.find<LiveAreaChildController>(
|
|
||||||
tag: '${item.id}${item.parentId}',
|
|
||||||
).animateToTop();
|
|
||||||
}
|
|
||||||
} catch (_) {}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
iconButton(
|
|
||||||
icon: const Icon(Icons.menu),
|
|
||||||
onPressed: () =>
|
|
||||||
_showTags(context, theme, bottom, response),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const Divider(height: 1),
|
),
|
||||||
Expanded(
|
iconButton(
|
||||||
child: tabBarView(
|
iconSize: 20,
|
||||||
children: response
|
tooltip:
|
||||||
.map(
|
'切换${_controller.showFirstFrame ? '封面' : '首帧'}',
|
||||||
(e) => LiveAreaChildPage(
|
icon: _controller.showFirstFrame
|
||||||
areaId: e.id,
|
? const Icon(MdiIcons.alphaFBox)
|
||||||
parentAreaId: e.parentId,
|
: const Icon(MdiIcons.image),
|
||||||
),
|
onPressed: () {
|
||||||
)
|
_controller.showFirstFrame =
|
||||||
.toList(),
|
!_controller.showFirstFrame;
|
||||||
),
|
setState(() {});
|
||||||
),
|
},
|
||||||
],
|
),
|
||||||
);
|
iconButton(
|
||||||
},
|
iconSize: 20,
|
||||||
),
|
tooltip: '显示菜单',
|
||||||
|
icon: const Icon(Icons.menu),
|
||||||
|
onPressed: () =>
|
||||||
|
_showTags(context, theme, bottom, response),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Divider(height: 1),
|
||||||
|
Expanded(
|
||||||
|
child: tabBarView(
|
||||||
|
controller: _controller.tabController,
|
||||||
|
children: response
|
||||||
|
.map(
|
||||||
|
(e) => LiveAreaChildPage(
|
||||||
|
areaId: e.id,
|
||||||
|
parentAreaId: e.parentId,
|
||||||
|
showFirstFrame: _controller.showFirstFrame,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
: LiveAreaChildPage(
|
: LiveAreaChildPage(
|
||||||
areaId: widget.areaId,
|
areaId: widget.areaId,
|
||||||
parentAreaId: widget.parentAreaId,
|
parentAreaId: widget.parentAreaId,
|
||||||
|
showFirstFrame: _controller.showFirstFrame,
|
||||||
),
|
),
|
||||||
Error() => LiveAreaChildPage(
|
Error() => LiveAreaChildPage(
|
||||||
areaId: widget.areaId,
|
areaId: widget.areaId,
|
||||||
parentAreaId: widget.parentAreaId,
|
parentAreaId: widget.parentAreaId,
|
||||||
|
showFirstFrame: _controller.showFirstFrame,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -226,7 +237,7 @@ class _LiveAreaDetailPageState extends State<LiveAreaDetailPage> {
|
|||||||
item: list[index],
|
item: list[index],
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
DefaultTabController.of(context).index = index;
|
_controller.tabController?.index = index;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user