diff --git a/lib/home/search_podcast.dart b/lib/home/search_podcast.dart index 0e829eb..c40c639 100644 --- a/lib/home/search_podcast.dart +++ b/lib/home/search_podcast.dart @@ -176,127 +176,115 @@ class _RssResultState extends State { length: 2, child: Column( children: [ - ListView( - physics: const NeverScrollableScrollPhysics(), - children: [ - SizedBox( - height: 140, - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.only(left: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: Text(_onlinePodcast.title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: context.textTheme.headline5), - ), - !_isSubscribed - ? OutlineButton( - highlightedBorderColor: context.accentColor, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(100.0), - side: BorderSide( - color: context.accentColor)), - splashColor: - context.accentColor.withOpacity(0.5), - child: Text(s.subscribe, - style: TextStyle( - color: context.accentColor)), - onPressed: () { - _subscribePodcast(_onlinePodcast); - setState(() { - _isSubscribed = true; - }); - Fluttertoast.showToast( - msg: s.podcastSubscribed, - gravity: ToastGravity.BOTTOM, - ); - }) - : OutlineButton( - color: context.accentColor.withOpacity(0.5), - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(100.0), - side: BorderSide( - color: Colors.grey[500])), - highlightedBorderColor: Colors.grey[500], - disabledTextColor: Colors.grey[500], - child: Text(s.subscribe), - disabledBorderColor: Colors.grey[500], - onPressed: () {}) - ], + SizedBox( + height: 140, + child: Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Text(_onlinePodcast.title, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: context.textTheme.headline5), ), - ), + !_isSubscribed + ? OutlineButton( + highlightedBorderColor: context.accentColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(100.0), + side: + BorderSide(color: context.accentColor)), + splashColor: + context.accentColor.withOpacity(0.5), + child: Text(s.subscribe, + style: + TextStyle(color: context.accentColor)), + onPressed: () { + _subscribePodcast(_onlinePodcast); + setState(() { + _isSubscribed = true; + }); + Fluttertoast.showToast( + msg: s.podcastSubscribed, + gravity: ToastGravity.BOTTOM, + ); + }) + : OutlineButton( + color: context.accentColor.withOpacity(0.5), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(100.0), + side: BorderSide(color: Colors.grey[500])), + highlightedBorderColor: Colors.grey[500], + disabledTextColor: Colors.grey[500], + child: Text(s.subscribe), + disabledBorderColor: Colors.grey[500], + onPressed: () {}) + ], ), - CachedNetworkImage( - height: 120.0, - width: 120.0, - fit: BoxFit.fitWidth, - alignment: Alignment.center, - imageUrl: _onlinePodcast.image, - progressIndicatorBuilder: - (context, url, downloadProgress) => Container( - height: 120, - width: 120, - alignment: Alignment.center, - color: context.primaryColorDark, - child: SizedBox( - width: 40, - height: 2, - child: LinearProgressIndicator( - value: downloadProgress.progress), - ), - ), - errorWidget: (context, url, error) => Container( - width: 120, - height: 120, - alignment: Alignment.center, - color: context.primaryColorDark, - child: Icon(Icons.error)), - ), - ], + ), ), - ), - ], + CachedNetworkImage( + height: 120.0, + width: 120.0, + fit: BoxFit.fitWidth, + alignment: Alignment.center, + imageUrl: _onlinePodcast.image, + progressIndicatorBuilder: (context, url, downloadProgress) => + Container( + height: 120, + width: 120, + alignment: Alignment.center, + color: context.primaryColorDark, + child: SizedBox( + width: 40, + height: 2, + child: LinearProgressIndicator( + value: downloadProgress.progress), + ), + ), + errorWidget: (context, url, error) => Container( + width: 120, + height: 120, + alignment: Alignment.center, + color: context.primaryColorDark, + child: Icon(Icons.error)), + ), + ], + ), ), - ListView( - physics: const NeverScrollableScrollPhysics(), - children: [ - Container( - height: 50, - color: context.scaffoldBackgroundColor, - child: TabBar( - indicatorColor: context.accentColor, - labelColor: context.textColor, - indicatorWeight: 3, - indicatorSize: TabBarIndicatorSize.label, - tabs: [ - Text(s.homeToprightMenuAbout), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text(s.episode(2)), - SizedBox(width: 2), - Container( - padding: const EdgeInsets.only( - left: 5, right: 5, top: 2, bottom: 2), - decoration: BoxDecoration( - color: context.accentColor, - borderRadius: BorderRadius.circular(100)), - child: Text(_onlinePodcast.count.toString(), - style: TextStyle(color: Colors.white))) - ], - ) - ]), - ), - ], + Container( + height: 50, + color: context.scaffoldBackgroundColor, + child: TabBar( + indicatorColor: context.accentColor, + labelColor: context.textColor, + indicatorWeight: 3, + indicatorSize: TabBarIndicatorSize.label, + tabs: [ + Text(s.homeToprightMenuAbout), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text(s.episode(2)), + SizedBox(width: 2), + Container( + padding: const EdgeInsets.only( + left: 5, right: 5, top: 2, bottom: 2), + decoration: BoxDecoration( + color: context.accentColor, + borderRadius: BorderRadius.circular(100)), + child: Text(_onlinePodcast.count.toString(), + style: TextStyle(color: Colors.white))) + ], + ) + ]), ), Expanded( child: TabBarView(children: [