Update podcast tile layout.

This commit is contained in:
Stonegate 2021-01-02 20:38:51 +08:00
parent ac2cace335
commit 774f39da1b
1 changed files with 55 additions and 61 deletions

View File

@ -14,6 +14,7 @@ import '../type/podcastlocal.dart';
import '../util/extension_helper.dart';
import '../widgets/duraiton_picker.dart';
import '../widgets/general_dialog.dart';
import 'podcast_settings.dart';
class PodcastGroupList extends StatefulWidget {
final PodcastGroup group;
@ -186,16 +187,7 @@ class __PodcastCardState extends State<_PodcastCard>
mainAxisSize: MainAxisSize.min,
children: <Widget>[
InkWell(
onTap: () => setState(
() {
_loadMenu = !_loadMenu;
if (_value == 0) {
_controller.forward();
} else {
_controller.reverse();
}
},
),
onTap: () => setState(() => _addGroup = !_addGroup),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12),
height: 100,
@ -203,29 +195,19 @@ class __PodcastCardState extends State<_PodcastCard>
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: Icon(
Icon(
Icons.unfold_more,
color: c,
),
CircleAvatar(
radius: 30,
child:
Image.file(File("${widget.podcastLocal.imagePath}")),
),
Container(
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
height: 60,
width: 60,
child: Image.file(
File("${widget.podcastLocal.imagePath}")),
),
),
),
Container(
width: width / 2,
padding: EdgeInsets.symmetric(horizontal: 10),
alignment: Alignment.centerLeft,
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
@ -246,19 +228,31 @@ class __PodcastCardState extends State<_PodcastCard>
}).toList(),
),
],
)),
Spacer(),
Transform.rotate(
angle: math.pi * _value,
child: Icon(Icons.keyboard_arrow_down),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 5.0),
),
IconButton(
icon: Icon(Icons.add),
splashRadius: 20,
tooltip: s.menu,
onPressed: () =>
setState(() => _addGroup = !_addGroup)),
IconButton(
icon: Icon(Icons.more_vert),
splashRadius: 20,
tooltip: s.menu,
onPressed: () => generalSheet(
context,
title: widget.podcastLocal.title,
child: PodcastSetting(
podcastLocal: widget.podcastLocal),
).then((value) {
setState(() {});
})),
SizedBox(width: 10),
]),
),
),
!_loadMenu
!_addGroup
? Center()
: Container(
child: Container(