mirror of
https://github.com/stonega/tsacdop
synced 2025-02-26 16:27:39 +01:00
Minor change.
This commit is contained in:
parent
f029a849a2
commit
526eeb885b
@ -81,6 +81,26 @@ class _ScrollPodcastsState extends State<ScrollPodcasts>
|
|||||||
BoxDecoration(shape: BoxShape.circle, color: context.primaryColor),
|
BoxDecoration(shape: BoxShape.circle, color: context.primaryColor),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Widget _updateIndicator(PodcastLocal podcastLocal) => FutureBuilder<int>(
|
||||||
|
future: _getPodcastUpdateCounts(podcastLocal.id),
|
||||||
|
initialData: 0,
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
return snapshot.data > 0
|
||||||
|
? Align(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: 10,
|
||||||
|
width: 10,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.red,
|
||||||
|
border: Border.all(color: context.primaryColor, width: 2),
|
||||||
|
shape: BoxShape.circle),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Center();
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final width = MediaQuery.of(context).size.width;
|
final width = MediaQuery.of(context).size.width;
|
||||||
@ -383,34 +403,8 @@ class _ScrollPodcastsState extends State<ScrollPodcasts>
|
|||||||
color.withOpacity(0.5),
|
color.withOpacity(0.5),
|
||||||
backgroundImage:
|
backgroundImage:
|
||||||
podcastLocal.avatarImage,
|
podcastLocal.avatarImage,
|
||||||
child: FutureBuilder<int>(
|
child: _updateIndicator(
|
||||||
future: _getPodcastUpdateCounts(
|
podcastLocal)),
|
||||||
podcastLocal.id),
|
|
||||||
initialData: 0,
|
|
||||||
builder: (context, snapshot) {
|
|
||||||
return snapshot.data > 0
|
|
||||||
? Align(
|
|
||||||
alignment: Alignment
|
|
||||||
.bottomRight,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment
|
|
||||||
.center,
|
|
||||||
height: 10,
|
|
||||||
width: 10,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color:
|
|
||||||
Colors.red,
|
|
||||||
border: Border.all(
|
|
||||||
color: context
|
|
||||||
.primaryColor,
|
|
||||||
width: 2),
|
|
||||||
shape: BoxShape
|
|
||||||
.circle),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Center();
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user