mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: live area
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -15,6 +15,8 @@ class LiveController extends CommonListController {
|
|||||||
queryData();
|
queryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int? count;
|
||||||
|
|
||||||
// area
|
// area
|
||||||
int? areaId;
|
int? areaId;
|
||||||
String? sortType;
|
String? sortType;
|
||||||
@@ -29,6 +31,13 @@ class LiveController extends CommonListController {
|
|||||||
Pair<LiveCardList?, LiveCardList?>(first: null, second: null).obs;
|
Pair<LiveCardList?, LiveCardList?>(first: null, second: null).obs;
|
||||||
final RxBool isLogin = Accounts.main.isLogin.obs;
|
final RxBool isLogin = Accounts.main.isLogin.obs;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void checkIsEnd(int length) {
|
||||||
|
if (count != null && length >= count!) {
|
||||||
|
isEnd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List? getDataList(response) {
|
List? getDataList(response) {
|
||||||
return response.cardList;
|
return response.cardList;
|
||||||
@@ -38,11 +47,15 @@ class LiveController extends CommonListController {
|
|||||||
bool customHandleResponse(bool isRefresh, Success response) {
|
bool customHandleResponse(bool isRefresh, Success response) {
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
if (areaIndex.value == 0) {
|
if (areaIndex.value == 0) {
|
||||||
|
if (response.response.hasMore == 0) {
|
||||||
|
isEnd = true;
|
||||||
|
}
|
||||||
topState.value = Pair(
|
topState.value = Pair(
|
||||||
first: response.response.followItem,
|
first: response.response.followItem,
|
||||||
second: response.response.areaItem,
|
second: response.response.areaItem,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
count = response.response.count;
|
||||||
newTags = response.response.newTags;
|
newTags = response.response.newTags;
|
||||||
if (sortType != null) {
|
if (sortType != null) {
|
||||||
tagIndex.value =
|
tagIndex.value =
|
||||||
@@ -69,6 +82,7 @@ class LiveController extends CommonListController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onRefresh() {
|
Future<void> onRefresh() {
|
||||||
|
count = null;
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
isEnd = false;
|
isEnd = false;
|
||||||
if (areaIndex.value != 0) {
|
if (areaIndex.value != 0) {
|
||||||
@@ -109,6 +123,7 @@ class LiveController extends CommonListController {
|
|||||||
areaId = cardLiveItem?.areaV2Id;
|
areaId = cardLiveItem?.areaV2Id;
|
||||||
parentAreaId = cardLiveItem?.areaV2ParentId;
|
parentAreaId = cardLiveItem?.areaV2ParentId;
|
||||||
|
|
||||||
|
count = null;
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
isEnd = false;
|
isEnd = false;
|
||||||
queryData();
|
queryData();
|
||||||
@@ -118,6 +133,7 @@ class LiveController extends CommonListController {
|
|||||||
tagIndex.value = index;
|
tagIndex.value = index;
|
||||||
this.sortType = sortType;
|
this.sortType = sortType;
|
||||||
|
|
||||||
|
count = null;
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
isEnd = false;
|
isEnd = false;
|
||||||
queryData();
|
queryData();
|
||||||
|
|||||||
@@ -147,8 +147,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
childCount: 10,
|
childCount: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Success() => loadingState.response?.isNotEmpty == true
|
Success() => SliverMainAxisGroup(
|
||||||
? SliverMainAxisGroup(
|
|
||||||
slivers: [
|
slivers: [
|
||||||
if (controller.newTags?.isNotEmpty == true)
|
if (controller.newTags?.isNotEmpty == true)
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
@@ -183,13 +182,15 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
itemCount: controller.newTags!.length,
|
itemCount: controller.newTags!.length,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverGrid(
|
loadingState.response?.isNotEmpty == true
|
||||||
|
? SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
mainAxisSpacing: StyleString.cardSpace,
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
crossAxisSpacing: StyleString.cardSpace,
|
crossAxisSpacing: StyleString.cardSpace,
|
||||||
maxCrossAxisExtent: Grid.smallCardWidth,
|
maxCrossAxisExtent: Grid.smallCardWidth,
|
||||||
childAspectRatio: StyleString.aspectRatio,
|
childAspectRatio: StyleString.aspectRatio,
|
||||||
mainAxisExtent: MediaQuery.textScalerOf(context).scale(90),
|
mainAxisExtent:
|
||||||
|
MediaQuery.textScalerOf(context).scale(90),
|
||||||
),
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(context, index) {
|
(context, index) {
|
||||||
@@ -206,10 +207,10 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
},
|
},
|
||||||
childCount: loadingState.response!.length,
|
childCount: loadingState.response!.length,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
: HttpError(onReload: controller.onReload),
|
: HttpError(onReload: controller.onReload),
|
||||||
|
],
|
||||||
|
),
|
||||||
Error() => HttpError(
|
Error() => HttpError(
|
||||||
errMsg: loadingState.errMsg,
|
errMsg: loadingState.errMsg,
|
||||||
onReload: controller.onReload,
|
onReload: controller.onReload,
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:PiliPlus/http/live.dart';
|
import 'package:PiliPlus/http/live.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||||
import 'package:PiliPlus/models/live/live_second_list/data.dart';
|
import 'package:PiliPlus/models/live/live_second_list/data.dart';
|
||||||
|
import 'package:PiliPlus/models/live/live_second_list/tag.dart';
|
||||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||||
import 'package:PiliPlus/utils/storage.dart';
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
class LiveAreaChildController
|
class LiveAreaChildController
|
||||||
extends CommonListController<LiveSecondData, CardLiveItem> {
|
extends CommonListController<LiveSecondData, CardLiveItem> {
|
||||||
@@ -11,8 +15,14 @@ class LiveAreaChildController
|
|||||||
final dynamic areaId;
|
final dynamic areaId;
|
||||||
final dynamic parentAreaId;
|
final dynamic parentAreaId;
|
||||||
|
|
||||||
|
int? count;
|
||||||
|
|
||||||
String? sortType;
|
String? sortType;
|
||||||
|
|
||||||
|
// tag
|
||||||
|
final RxInt tagIndex = 0.obs;
|
||||||
|
List<LiveSecondTag>? newTags;
|
||||||
|
|
||||||
final isLogin = Accounts.main.isLogin;
|
final isLogin = Accounts.main.isLogin;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -21,8 +31,19 @@ class LiveAreaChildController
|
|||||||
queryData();
|
queryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void checkIsEnd(int length) {
|
||||||
|
if (count != null && length >= count!) {
|
||||||
|
isEnd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<CardLiveItem>? getDataList(LiveSecondData response) {
|
List<CardLiveItem>? getDataList(LiveSecondData response) {
|
||||||
|
count = response.count;
|
||||||
|
newTags = response.newTags;
|
||||||
|
tagIndex.value =
|
||||||
|
max(0, newTags?.indexWhere((e) => e.sortType == sortType) ?? 0);
|
||||||
return response.cardList;
|
return response.cardList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,4 +56,11 @@ class LiveAreaChildController
|
|||||||
parentAreaId: parentAreaId,
|
parentAreaId: parentAreaId,
|
||||||
sortType: sortType,
|
sortType: sortType,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void onSelectTag(int index, String? sortType) {
|
||||||
|
tagIndex.value = index;
|
||||||
|
this.sortType = sortType;
|
||||||
|
|
||||||
|
onRefresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ import 'package:PiliPlus/common/constants.dart';
|
|||||||
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
import 'package:PiliPlus/common/skeleton/video_card_v.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/self_sized_horizontal_list.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
import 'package:PiliPlus/models/live/live_feed_index/card_data_list_item.dart';
|
||||||
import 'package:PiliPlus/pages/live/widgets/live_item_app.dart';
|
import 'package:PiliPlus/pages/live/widgets/live_item_app.dart';
|
||||||
import 'package:PiliPlus/pages/live_area_detail/child/controller.dart';
|
import 'package:PiliPlus/pages/live_area_detail/child/controller.dart';
|
||||||
|
import 'package:PiliPlus/pages/search/widgets/search_text.dart';
|
||||||
import 'package:PiliPlus/utils/grid.dart';
|
import 'package:PiliPlus/utils/grid.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -34,6 +36,7 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
|
final ThemeData theme = Theme.of(context);
|
||||||
return refreshIndicator(
|
return refreshIndicator(
|
||||||
onRefresh: _controller.onRefresh,
|
onRefresh: _controller.onRefresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
@@ -45,14 +48,16 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
|||||||
top: StyleString.safeSpace,
|
top: StyleString.safeSpace,
|
||||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: Obx(() => _buildBody(_controller.loadingState.value)),
|
sliver:
|
||||||
|
Obx(() => _buildBody(theme, _controller.loadingState.value)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody(LoadingState<List<CardLiveItem>?> loadingState) {
|
Widget _buildBody(
|
||||||
|
ThemeData theme, LoadingState<List<CardLiveItem>?> loadingState) {
|
||||||
return switch (loadingState) {
|
return switch (loadingState) {
|
||||||
Loading() => SliverGrid(
|
Loading() => SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
@@ -69,21 +74,60 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
|||||||
childCount: 10,
|
childCount: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Success() => loadingState.response?.isNotEmpty == true
|
Success() => SliverMainAxisGroup(
|
||||||
|
slivers: [
|
||||||
|
if (_controller.newTags?.isNotEmpty == true)
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 12),
|
||||||
|
child: SelfSizedHorizontalList(
|
||||||
|
gapSize: 12,
|
||||||
|
childBuilder: (index) {
|
||||||
|
late final item = _controller.newTags![index];
|
||||||
|
return Obx(
|
||||||
|
() => SearchText(
|
||||||
|
fontSize: 14,
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8,
|
||||||
|
vertical: 3,
|
||||||
|
),
|
||||||
|
text: '${item.name}',
|
||||||
|
bgColor: index == _controller.tagIndex.value
|
||||||
|
? theme.colorScheme.secondaryContainer
|
||||||
|
: Colors.transparent,
|
||||||
|
textColor: index == _controller.tagIndex.value
|
||||||
|
? theme.colorScheme.onSecondaryContainer
|
||||||
|
: null,
|
||||||
|
onTap: (value) {
|
||||||
|
_controller.onSelectTag(
|
||||||
|
index,
|
||||||
|
item.sortType,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: _controller.newTags!.length,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
loadingState.response?.isNotEmpty == true
|
||||||
? SliverGrid(
|
? SliverGrid(
|
||||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||||
mainAxisSpacing: StyleString.cardSpace,
|
mainAxisSpacing: StyleString.cardSpace,
|
||||||
crossAxisSpacing: StyleString.cardSpace,
|
crossAxisSpacing: StyleString.cardSpace,
|
||||||
maxCrossAxisExtent: Grid.smallCardWidth,
|
maxCrossAxisExtent: Grid.smallCardWidth,
|
||||||
childAspectRatio: StyleString.aspectRatio,
|
childAspectRatio: StyleString.aspectRatio,
|
||||||
mainAxisExtent: MediaQuery.textScalerOf(context).scale(90),
|
mainAxisExtent:
|
||||||
|
MediaQuery.textScalerOf(context).scale(90),
|
||||||
),
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(context, index) {
|
(context, index) {
|
||||||
if (index == loadingState.response!.length - 1) {
|
if (index == loadingState.response!.length - 1) {
|
||||||
_controller.onLoadMore();
|
_controller.onLoadMore();
|
||||||
}
|
}
|
||||||
return LiveCardVApp(item: loadingState.response![index]);
|
return LiveCardVApp(
|
||||||
|
item: loadingState.response![index]);
|
||||||
},
|
},
|
||||||
childCount: loadingState.response!.length,
|
childCount: loadingState.response!.length,
|
||||||
),
|
),
|
||||||
@@ -91,6 +135,8 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
|||||||
: HttpError(
|
: HttpError(
|
||||||
onReload: _controller.onReload,
|
onReload: _controller.onReload,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Error() => HttpError(
|
Error() => HttpError(
|
||||||
errMsg: loadingState.errMsg,
|
errMsg: loadingState.errMsg,
|
||||||
onReload: _controller.onReload,
|
onReload: _controller.onReload,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/live/live_area_list/area_item.dart';
|
import 'package:PiliPlus/models/live/live_area_list/area_item.dart';
|
||||||
@@ -59,16 +61,35 @@ class _LiveAreaDetailPageState extends State<LiveAreaDetailPage> {
|
|||||||
? DefaultTabController(
|
? DefaultTabController(
|
||||||
initialIndex: _controller.initialIndex,
|
initialIndex: _controller.initialIndex,
|
||||||
length: loadingState.response!.length,
|
length: loadingState.response!.length,
|
||||||
child: Column(
|
child: Builder(
|
||||||
|
builder: (context) {
|
||||||
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TabBar(
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TabBar(
|
||||||
|
dividerHeight: 0,
|
||||||
|
dividerColor: Colors.transparent,
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
tabAlignment: TabAlignment.start,
|
tabAlignment: TabAlignment.start,
|
||||||
tabs: loadingState.response!
|
tabs: loadingState.response!
|
||||||
.map((e) => Tab(text: e.name ?? ''))
|
.map((e) => Tab(text: e.name ?? ''))
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
iconButton(
|
||||||
|
context: context,
|
||||||
|
icon: Icons.menu,
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
onPressed: () {
|
||||||
|
_showTags(context, theme, loadingState.response!);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Divider(height: 1),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: tabBarView(
|
child: tabBarView(
|
||||||
children: loadingState.response!
|
children: loadingState.response!
|
||||||
@@ -80,6 +101,8 @@ class _LiveAreaDetailPageState extends State<LiveAreaDetailPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: LiveAreaChildPage(
|
: LiveAreaChildPage(
|
||||||
@@ -92,4 +115,105 @@ class _LiveAreaDetailPageState extends State<LiveAreaDetailPage> {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _tagItem({
|
||||||
|
required ThemeData theme,
|
||||||
|
required AreaItem item,
|
||||||
|
required VoidCallback onTap,
|
||||||
|
}) {
|
||||||
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: onTap,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
NetworkImgLayer(
|
||||||
|
width: 45,
|
||||||
|
height: 45,
|
||||||
|
src: item.pic,
|
||||||
|
type: 'emote',
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
item.name!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(fontSize: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showTags(BuildContext context, ThemeData theme, List<AreaItem> list) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
useSafeArea: true,
|
||||||
|
isScrollControlled: true,
|
||||||
|
builder: (_) {
|
||||||
|
return DraggableScrollableSheet(
|
||||||
|
minChildSize: 0,
|
||||||
|
maxChildSize: 1,
|
||||||
|
initialChildSize: 1,
|
||||||
|
snap: true,
|
||||||
|
expand: false,
|
||||||
|
snapSizes: const [1],
|
||||||
|
builder: (_, scrollController) {
|
||||||
|
return NotificationListener<DraggableScrollableNotification>(
|
||||||
|
onNotification: (notification) {
|
||||||
|
if (notification.extent <= 1e-5) {
|
||||||
|
Get.back();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AppBar(
|
||||||
|
centerTitle: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
title: Text(widget.parentName),
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: Get.back,
|
||||||
|
icon: const Icon(Icons.clear),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: GridView.builder(
|
||||||
|
controller: scrollController,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 12,
|
||||||
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
|
),
|
||||||
|
itemCount: list.length,
|
||||||
|
gridDelegate:
|
||||||
|
const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
|
maxCrossAxisExtent: 100,
|
||||||
|
mainAxisSpacing: 10,
|
||||||
|
crossAxisSpacing: 10,
|
||||||
|
mainAxisExtent: 80,
|
||||||
|
),
|
||||||
|
itemBuilder: (_, index) {
|
||||||
|
return _tagItem(
|
||||||
|
theme: theme,
|
||||||
|
item: list[index],
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
DefaultTabController.of(context).index = index;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user