mirror of
https://github.com/stonega/tsacdop
synced 2025-02-10 00:20:49 +01:00
Minor ui change.
This commit is contained in:
parent
f37241d795
commit
e17ed8a81f
@ -176,127 +176,115 @@ class _RssResultState extends State<RssResult> {
|
||||
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: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user