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/pair.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_list.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 (list.isNotEmpty)
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: const .only(bottom: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
// 20+10+14*textScaler
|
||||
height: 30.0 + textScaler.scale(14),
|
||||
// 10+14*textScaler
|
||||
height: 10.0 + textScaler.scale(14),
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
separatorBuilder: (context, index) =>
|
||||
const SizedBox(width: 12),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 10,
|
||||
bottom: 10,
|
||||
right: 12,
|
||||
),
|
||||
scrollDirection: .horizontal,
|
||||
padding: const .only(right: 8),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||
itemBuilder: (context, index) {
|
||||
late final item = list[index - 1];
|
||||
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
|
||||
height: 18.0 + textScaler.scale(13),
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
scrollDirection: .horizontal,
|
||||
padding: const .only(bottom: 8),
|
||||
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
late final item = newTags[index];
|
||||
return Obx(
|
||||
@@ -260,6 +257,8 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
List<Widget> _buildFollowList(ThemeData theme, LiveCardList item) {
|
||||
return [
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: const .only(bottom: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Text.rich(
|
||||
@@ -292,6 +291,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (item.cardData?.myIdolV1?.list case final list?)
|
||||
if (list.isNotEmpty) _buildFollowBody(theme, list),
|
||||
];
|
||||
@@ -300,17 +300,20 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
Widget _buildFollowBody(ThemeData theme, List<CardLiveItem> followList) {
|
||||
return SliverToBoxAdapter(
|
||||
child: SizedBox(
|
||||
// 8+4+4+45+4+12*textScaler
|
||||
height: 65.0 + textScaler.scale(12),
|
||||
// 3+4+45+6+10+12*textScaler
|
||||
height: 68.0 + textScaler.scale(12),
|
||||
child: CustomScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverFixedExtentList.builder(
|
||||
itemExtent: 70,
|
||||
itemCount: followList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = followList[index];
|
||||
return SizedBox(
|
||||
return Padding(
|
||||
padding: const .only(right: 5),
|
||||
child: SizedBox(
|
||||
width: 65,
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@@ -323,28 +326,26 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
? null
|
||||
: () => Get.toNamed('/member?mid=${item.uid}'),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisSize: .min,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
margin: const EdgeInsets.all(2),
|
||||
padding: const EdgeInsets.all(2),
|
||||
padding: const .all(2),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.5,
|
||||
color: theme.colorScheme.primary,
|
||||
strokeAlign: BorderSide.strokeAlignOutside,
|
||||
strokeAlign: BorderSide.strokeAlignInside,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
shape: .circle,
|
||||
),
|
||||
child: NetworkImgLayer(
|
||||
type: ImageType.avatar,
|
||||
type: .avatar,
|
||||
width: 45,
|
||||
height: 45,
|
||||
src: item.face,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
item.uname!,
|
||||
maxLines: 1,
|
||||
@@ -355,6 +356,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user