mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +08:00
85 lines
2.6 KiB
Dart
85 lines
2.6 KiB
Dart
import 'package:PiliPlus/common/constants.dart';
|
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class MemberComicItem extends StatelessWidget {
|
|
const MemberComicItem({super.key, required this.item});
|
|
|
|
final SpaceArchiveItem item;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
late final style = TextStyle(
|
|
fontSize: 13,
|
|
color: theme.colorScheme.onSurfaceVariant,
|
|
);
|
|
return Material(
|
|
type: MaterialType.transparency,
|
|
child: InkWell(
|
|
onTap: () {
|
|
Get.toNamed(
|
|
'/webview',
|
|
parameters: {
|
|
'url': 'https://manga.bilibili.com/detail/mc${item.param}',
|
|
},
|
|
);
|
|
},
|
|
onLongPress: () =>
|
|
imageSaveDialog(title: item.title, cover: item.cover),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: StyleString.safeSpace,
|
|
vertical: 5,
|
|
),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AspectRatio(
|
|
aspectRatio: 3 / 4,
|
|
child: LayoutBuilder(
|
|
builder:
|
|
(BuildContext context, BoxConstraints boxConstraints) {
|
|
return NetworkImgLayer(
|
|
radius: 4,
|
|
src: item.cover,
|
|
width: boxConstraints.maxWidth,
|
|
height: boxConstraints.maxHeight,
|
|
);
|
|
},
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(item.title),
|
|
if (item.styles != null) ...[
|
|
const SizedBox(height: 6),
|
|
Text(
|
|
item.styles!,
|
|
style: style,
|
|
),
|
|
],
|
|
if (item.label != null) ...[
|
|
Text(
|
|
item.label!,
|
|
style: style,
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|