mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: add playback history provider * feat: implement recently played section * refactor: use route names * feat: add stats summary and top tracks/artists/albums * feat: add top date based filtering * feat: add stream money calculation * refactor: place search in mobile navbar and settings in home appbar * feat: add individual minutes and streams page * feat(stats): add individual minutes and streams page * chore: default period to 1 month * feat: add text to explain user how hypothetical fees are calculated * chore: ensure usage of route names instead of direct paths * cd: add cache key * cd: remove media_kit_event_loop from git
40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:spotify/spotify.dart';
|
|
import 'package:spotube/components/shared/image/universal_image.dart';
|
|
import 'package:spotube/extensions/image.dart';
|
|
import 'package:spotube/pages/artist/artist.dart';
|
|
import 'package:spotube/utils/service_utils.dart';
|
|
|
|
class StatsArtistItem extends StatelessWidget {
|
|
final Artist artist;
|
|
final Widget info;
|
|
const StatsArtistItem({
|
|
super.key,
|
|
required this.artist,
|
|
required this.info,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
title: Text(artist.name!),
|
|
horizontalTitleGap: 8,
|
|
leading: CircleAvatar(
|
|
backgroundImage: UniversalImage.imageProvider(
|
|
(artist.images).asUrlString(
|
|
placeholder: ImagePlaceholder.artist,
|
|
),
|
|
),
|
|
),
|
|
trailing: info,
|
|
onTap: () {
|
|
ServiceUtils.pushNamed(
|
|
context,
|
|
ArtistPage.name,
|
|
pathParameters: {"id": artist.id!},
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|