diff --git a/lib/home/home_groups.dart b/lib/home/home_groups.dart index 2edc9ba..fe81144 100644 --- a/lib/home/home_groups.dart +++ b/lib/home/home_groups.dart @@ -36,7 +36,7 @@ class _ScrollPodcastsState extends State int _groupIndex = 0; AnimationController _controller; TweenSequence _slideTween; - _getSlideTween(double value) => TweenSequence([ + TweenSequence _getSlideTween(double value) => TweenSequence([ TweenSequenceItem( tween: Tween(begin: 0.0, end: value), weight: 3 / 5), TweenSequenceItem(tween: ConstantTween(value), weight: 1 / 5), @@ -80,7 +80,7 @@ class _ScrollPodcastsState extends State @override Widget build(BuildContext context) { - var width = MediaQuery.of(context).size.width; + final width = MediaQuery.of(context).size.width; final s = context.s; return Selector, bool, bool>>( selector: (_, groupList) => @@ -907,27 +907,27 @@ class ShowEpisode extends StatelessWidget { episodes[index].pubDate), overflow: TextOverflow.visible, style: TextStyle( + height: 1, fontSize: _width / 35, color: c, fontStyle: FontStyle.italic, ), ), Spacer(), - episodes[index].duration != 0 - ? Container( - alignment: Alignment.center, - child: Text( - episodes[index] - .duration - .toTime, - style: TextStyle( - fontSize: _width / 35, - // color: _c, - // fontStyle: FontStyle.italic, - ), - ), - ) - : Center(), + if (episodes[index].duration != 0) + Align( + alignment: Alignment.center, + child: Text( + episodes[index] + .duration + .toTime, + style: TextStyle( + fontSize: _width / 35, + // color: _c, + // fontStyle: FontStyle.italic, + ), + ), + ), episodes[index].duration == 0 || episodes[index] .enclosureLength == @@ -940,25 +940,22 @@ class ShowEpisode extends StatelessWidget { '|', style: TextStyle( fontSize: _width / 35, - // color: _c, - // fontStyle: FontStyle.italic, ), ), - episodes[index].enclosureLength != - null && - episodes[index] - .enclosureLength != - 0 - ? Container( - alignment: Alignment.center, - child: Text( - '${(episodes[index].enclosureLength) ~/ 1000000}MB', - style: TextStyle( - fontSize: - _width / 35), - ), - ) - : Center(), + if (episodes[index] + .enclosureLength != + null && + episodes[index] + .enclosureLength != + 0) + Container( + alignment: Alignment.center, + child: Text( + '${(episodes[index].enclosureLength) ~/ 1000000}MB', + style: TextStyle( + fontSize: _width / 35), + ), + ), ], )), ], diff --git a/lib/util/episodegrid.dart b/lib/util/episodegrid.dart index b92d2b4..b9b58b2 100644 --- a/lib/util/episodegrid.dart +++ b/lib/util/episodegrid.dart @@ -194,7 +194,9 @@ class EpisodeGrid extends StatelessWidget { Text( episode.pubDate.toDate(context), overflow: TextOverflow.visible, + textAlign: TextAlign.center, style: TextStyle( + height: 1, fontSize: context.width / 35, color: color, fontStyle: FontStyle.italic), @@ -468,10 +470,6 @@ class EpisodeGrid extends StatelessWidget { episode: episodes[index], color: c), Spacer(), - - /// _listenIndicater(context, - // episode: episodes[index], - // isListened: snapshot.data), _isNewIndicator(episodes[index]), _downloadIndicater(context, episode: episodes[index], @@ -517,7 +515,7 @@ class EpisodeGrid extends StatelessWidget { Spacer(), if (layout != Layout.three && episodes[index].duration != 0) - Container( + Align( alignment: Alignment.center, child: Text( episodes[index].duration.toTime, @@ -535,8 +533,6 @@ class EpisodeGrid extends StatelessWidget { '|', style: TextStyle( fontSize: _width / 35, - // color: _c, - // fontStyle: FontStyle.italic, ), ), if (layout != Layout.three && @@ -544,7 +540,7 @@ class EpisodeGrid extends StatelessWidget { null && episodes[index].enclosureLength != 0) - Container( + Align( alignment: Alignment.center, child: Text( '${(episodes[index].enclosureLength) ~/ 1000000}MB',