mirror of
https://github.com/stonega/tsacdop
synced 2025-02-26 16:27:39 +01:00
Update podcast tile layout.
This commit is contained in:
parent
ac2cace335
commit
774f39da1b
@ -14,6 +14,7 @@ import '../type/podcastlocal.dart';
|
|||||||
import '../util/extension_helper.dart';
|
import '../util/extension_helper.dart';
|
||||||
import '../widgets/duraiton_picker.dart';
|
import '../widgets/duraiton_picker.dart';
|
||||||
import '../widgets/general_dialog.dart';
|
import '../widgets/general_dialog.dart';
|
||||||
|
import 'podcast_settings.dart';
|
||||||
|
|
||||||
class PodcastGroupList extends StatefulWidget {
|
class PodcastGroupList extends StatefulWidget {
|
||||||
final PodcastGroup group;
|
final PodcastGroup group;
|
||||||
@ -186,16 +187,7 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => setState(
|
onTap: () => setState(() => _addGroup = !_addGroup),
|
||||||
() {
|
|
||||||
_loadMenu = !_loadMenu;
|
|
||||||
if (_value == 0) {
|
|
||||||
_controller.forward();
|
|
||||||
} else {
|
|
||||||
_controller.reverse();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||||
height: 100,
|
height: 100,
|
||||||
@ -203,62 +195,64 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Icon(
|
||||||
child: Icon(
|
Icons.unfold_more,
|
||||||
Icons.unfold_more,
|
color: c,
|
||||||
color: c,
|
),
|
||||||
|
CircleAvatar(
|
||||||
|
radius: 30,
|
||||||
|
child:
|
||||||
|
Image.file(File("${widget.podcastLocal.imagePath}")),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
widget.podcastLocal.title,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold, fontSize: 15),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: _belongGroups.map((group) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.only(right: 5.0),
|
||||||
|
child: Text(group.name));
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
IconButton(
|
||||||
child: ClipRRect(
|
icon: Icon(Icons.add),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
splashRadius: 20,
|
||||||
child: Container(
|
tooltip: s.menu,
|
||||||
height: 60,
|
onPressed: () =>
|
||||||
width: 60,
|
setState(() => _addGroup = !_addGroup)),
|
||||||
child: Image.file(
|
IconButton(
|
||||||
File("${widget.podcastLocal.imagePath}")),
|
icon: Icon(Icons.more_vert),
|
||||||
),
|
splashRadius: 20,
|
||||||
),
|
tooltip: s.menu,
|
||||||
),
|
onPressed: () => generalSheet(
|
||||||
Container(
|
context,
|
||||||
width: width / 2,
|
title: widget.podcastLocal.title,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
child: PodcastSetting(
|
||||||
alignment: Alignment.centerLeft,
|
podcastLocal: widget.podcastLocal),
|
||||||
child: Column(
|
).then((value) {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
setState(() {});
|
||||||
mainAxisSize: MainAxisSize.min,
|
})),
|
||||||
children: <Widget>[
|
SizedBox(width: 10),
|
||||||
Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Text(
|
|
||||||
widget.podcastLocal.title,
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.fade,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold, fontSize: 15),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: _belongGroups.map((group) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.only(right: 5.0),
|
|
||||||
child: Text(group.name));
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
Spacer(),
|
|
||||||
Transform.rotate(
|
|
||||||
angle: math.pi * _value,
|
|
||||||
child: Icon(Icons.keyboard_arrow_down),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
|
||||||
),
|
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
!_loadMenu
|
!_addGroup
|
||||||
? Center()
|
? Center()
|
||||||
: Container(
|
: Container(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user