opt: bangumi layout
This commit is contained in:
@ -430,7 +430,7 @@ class EpisodeGridItem extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isCurrentIndex
|
color: isCurrentIndex
|
||||||
? colorScheme.primaryContainer.withOpacity(0.6)
|
? colorScheme.primaryContainer.withOpacity(0.6)
|
||||||
: colorScheme.secondaryContainer.withOpacity(0.4),
|
: colorScheme.onInverseSurface.withOpacity(0.6),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: isCurrentIndex
|
color: isCurrentIndex
|
||||||
|
|||||||
@ -239,88 +239,65 @@ class _BangumiInfoState extends State<BangumiInfo> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => showIntroDetail(),
|
onTap: () => showIntroDetail(),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 115 / 0.75,
|
height: 115 / 0.75,
|
||||||
child: Column(
|
child: Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.fromLTRB(6, 4, 6, 6),
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Row(
|
||||||
child: Text(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
widget.bangumiDetail!.title!,
|
children: [
|
||||||
style: const TextStyle(
|
Expanded(
|
||||||
fontSize: 16,
|
child: Text(
|
||||||
fontWeight: FontWeight.w500,
|
widget.bangumiDetail!.title!,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(width: 20),
|
||||||
const SizedBox(width: 20),
|
Obx(
|
||||||
Obx(
|
() => BangumiStatusWidget(
|
||||||
() => BangumiStatusWidget(
|
ctr: bangumiIntroController,
|
||||||
ctr: bangumiIntroController,
|
isFollowed:
|
||||||
isFollowed:
|
bangumiIntroController.isFollowed.value,
|
||||||
bangumiIntroController.isFollowed.value,
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
StatView(
|
|
||||||
view: widget.bangumiDetail!.stat!['views'],
|
|
||||||
size: 'medium',
|
|
||||||
),
|
|
||||||
const SizedBox(width: 6),
|
|
||||||
StatDanMu(
|
|
||||||
danmu: widget.bangumiDetail!.stat!['danmakus'],
|
|
||||||
size: 'medium',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
(widget.bangumiDetail!.areas!.isNotEmpty
|
|
||||||
? widget.bangumiDetail!.areas!.first['name']
|
|
||||||
: ''),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: t.colorScheme.outline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 6),
|
|
||||||
Text(
|
|
||||||
widget.bangumiDetail!.publish!['pub_time_show'],
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: t.colorScheme.outline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.bangumiDetail!.newEp!['desc'],
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: t.colorScheme.outline,
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 4),
|
||||||
const Spacer(),
|
Row(
|
||||||
Text(
|
children: [
|
||||||
'简介:${widget.bangumiDetail!.evaluate!}',
|
StatView(
|
||||||
maxLines: 3,
|
view: widget.bangumiDetail!.stat!['views'],
|
||||||
overflow: TextOverflow.ellipsis,
|
size: 'medium',
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 13,
|
const SizedBox(width: 6),
|
||||||
color: t.colorScheme.outline,
|
StatDanMu(
|
||||||
|
danmu: widget.bangumiDetail!.stat!['danmakus'],
|
||||||
|
size: 'medium',
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
],
|
Text(
|
||||||
|
'简介:${widget.bangumiDetail!.evaluate!}',
|
||||||
|
maxLines: 3,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: t.colorScheme.outline,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -175,59 +175,60 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
return Container(
|
return Container(
|
||||||
width: 150,
|
width: 150,
|
||||||
margin: const EdgeInsets.only(right: 10),
|
margin: const EdgeInsets.only(right: 10),
|
||||||
child: Material(
|
clipBehavior: Clip.antiAlias,
|
||||||
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(8),
|
||||||
clipBehavior: Clip.hardEdge,
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => changeFucCall(page, i),
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: Padding(
|
onTap: () => changeFucCall(page, i),
|
||||||
padding: const EdgeInsets.symmetric(
|
child: Padding(
|
||||||
vertical: 8,
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 10,
|
vertical: 8,
|
||||||
),
|
horizontal: 10,
|
||||||
child: Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: <Widget>[
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Row(
|
children: <Widget>[
|
||||||
children: [
|
Row(
|
||||||
if (isSelected) ...<Widget>[
|
children: [
|
||||||
Image.asset('assets/images/live.png',
|
if (isSelected) ...<Widget>[
|
||||||
color: primary, height: 12),
|
Image.asset('assets/images/live.png',
|
||||||
const SizedBox(width: 6)
|
color: primary, height: 12),
|
||||||
],
|
const SizedBox(width: 6)
|
||||||
|
],
|
||||||
|
Text(
|
||||||
|
'第${i + 1}话',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: isSelected ? primary : onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 2),
|
||||||
|
if (page.badge != null) ...[
|
||||||
|
const Spacer(),
|
||||||
Text(
|
Text(
|
||||||
'第${i + 1}话',
|
page.badge!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 12,
|
||||||
color: isSelected ? primary : onSurface,
|
color: primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
]
|
||||||
if (page.badge != null) ...[
|
],
|
||||||
const Spacer(),
|
),
|
||||||
Text(
|
const SizedBox(height: 3),
|
||||||
page.badge!,
|
Text(
|
||||||
style: TextStyle(
|
page.longTitle!,
|
||||||
fontSize: 12,
|
maxLines: 1,
|
||||||
color: primary,
|
style: TextStyle(
|
||||||
),
|
fontSize: 13,
|
||||||
),
|
color: isSelected ? primary : onSurface,
|
||||||
]
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 3),
|
overflow: TextOverflow.ellipsis,
|
||||||
Text(
|
)
|
||||||
page.longTitle!,
|
],
|
||||||
maxLines: 1,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13,
|
|
||||||
color: isSelected ? primary : onSurface,
|
|
||||||
),
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user