mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
@@ -7,7 +7,6 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.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/pair.dart';
|
import 'package:PiliPlus/common/widgets/pair.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/models/common/image_type.dart';
|
|
||||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_list.dart';
|
import 'package:PiliPlus/models_new/live/live_feed_index/card_list.dart';
|
||||||
import 'package:PiliPlus/pages/common/common_page.dart';
|
import 'package:PiliPlus/pages/common/common_page.dart';
|
||||||
@@ -88,21 +87,19 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
if (data.second?.cardData?.areaEntranceV3?.list case final list?)
|
if (data.second?.cardData?.areaEntranceV3?.list case final list?)
|
||||||
if (list.isNotEmpty)
|
if (list.isNotEmpty)
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
|
child: Padding(
|
||||||
|
padding: const .only(bottom: 8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// 20+10+14*textScaler
|
// 10+14*textScaler
|
||||||
height: 30.0 + textScaler.scale(14),
|
height: 10.0 + textScaler.scale(14),
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: .horizontal,
|
||||||
separatorBuilder: (context, index) =>
|
padding: const .only(right: 8),
|
||||||
const SizedBox(width: 12),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
padding: const EdgeInsets.only(
|
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||||
top: 10,
|
|
||||||
bottom: 10,
|
|
||||||
right: 12,
|
|
||||||
),
|
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
late final item = list[index - 1];
|
late final item = list[index - 1];
|
||||||
return Obx(
|
return Obx(
|
||||||
@@ -163,9 +160,8 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
else
|
),
|
||||||
const SliverToBoxAdapter(child: SizedBox(height: 10)),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -194,9 +190,10 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
// 8+10+13*textScaler
|
// 8+10+13*textScaler
|
||||||
height: 18.0 + textScaler.scale(13),
|
height: 18.0 + textScaler.scale(13),
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: .horizontal,
|
||||||
|
padding: const .only(bottom: 8),
|
||||||
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||||
padding: const EdgeInsets.only(bottom: 8),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
late final item = newTags[index];
|
late final item = newTags[index];
|
||||||
return Obx(
|
return Obx(
|
||||||
@@ -260,6 +257,8 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
List<Widget> _buildFollowList(ThemeData theme, LiveCardList item) {
|
List<Widget> _buildFollowList(ThemeData theme, LiveCardList item) {
|
||||||
return [
|
return [
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
|
child: Padding(
|
||||||
|
padding: const .only(bottom: 8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text.rich(
|
Text.rich(
|
||||||
@@ -292,6 +291,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (item.cardData?.myIdolV1?.list case final list?)
|
if (item.cardData?.myIdolV1?.list case final list?)
|
||||||
if (list.isNotEmpty) _buildFollowBody(theme, list),
|
if (list.isNotEmpty) _buildFollowBody(theme, list),
|
||||||
];
|
];
|
||||||
@@ -300,17 +300,20 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
Widget _buildFollowBody(ThemeData theme, List<CardLiveItem> followList) {
|
Widget _buildFollowBody(ThemeData theme, List<CardLiveItem> followList) {
|
||||||
return SliverToBoxAdapter(
|
return SliverToBoxAdapter(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// 8+4+4+45+4+12*textScaler
|
// 3+4+45+6+10+12*textScaler
|
||||||
height: 65.0 + textScaler.scale(12),
|
height: 68.0 + textScaler.scale(12),
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverFixedExtentList.builder(
|
SliverFixedExtentList.builder(
|
||||||
itemExtent: 70,
|
itemExtent: 70,
|
||||||
itemCount: followList.length,
|
itemCount: followList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final item = followList[index];
|
final item = followList[index];
|
||||||
return SizedBox(
|
return Padding(
|
||||||
|
padding: const .only(right: 5),
|
||||||
|
child: SizedBox(
|
||||||
width: 65,
|
width: 65,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
@@ -323,28 +326,26 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
? null
|
? null
|
||||||
: () => Get.toNamed('/member?mid=${item.uid}'),
|
: () => Get.toNamed('/member?mid=${item.uid}'),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: .min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 8),
|
|
||||||
Container(
|
Container(
|
||||||
margin: const EdgeInsets.all(2),
|
padding: const .all(2),
|
||||||
padding: const EdgeInsets.all(2),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 1.5,
|
width: 1.5,
|
||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
strokeAlign: BorderSide.strokeAlignOutside,
|
strokeAlign: BorderSide.strokeAlignInside,
|
||||||
),
|
),
|
||||||
shape: BoxShape.circle,
|
shape: .circle,
|
||||||
),
|
),
|
||||||
child: NetworkImgLayer(
|
child: NetworkImgLayer(
|
||||||
type: ImageType.avatar,
|
type: .avatar,
|
||||||
width: 45,
|
width: 45,
|
||||||
height: 45,
|
height: 45,
|
||||||
src: item.face,
|
src: item.face,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 6),
|
||||||
Text(
|
Text(
|
||||||
item.uname!,
|
item.uname!,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@@ -355,6 +356,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user