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

AlbumCard, ArtistCard, ArtistAlbumCard & ArtistProfile added UserArtist finished macos build artifacts upload path corrected
28 lines
888 B
Dart
28 lines
888 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:spotify/spotify.dart';
|
|
import 'package:spotube/components/Shared/PlaybuttonCard.dart';
|
|
import 'package:spotube/helpers/artist-to-string.dart';
|
|
import 'package:spotube/provider/Playback.dart';
|
|
|
|
class AlbumCard extends StatelessWidget {
|
|
final Album album;
|
|
const AlbumCard(this.album, {Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Playback playback = context.watch<Playback>();
|
|
|
|
return PlaybuttonCard(
|
|
imageUrl: album.images!.first.url!,
|
|
isPlaying: playback.currentPlaylist?.id != null &&
|
|
playback.currentPlaylist?.id == album.id,
|
|
title: album.name!,
|
|
description:
|
|
"Alubm • ${artistsToString<ArtistSimple>(album.artists ?? [])}",
|
|
onTap: () {},
|
|
onPlaybuttonPressed: () => {},
|
|
);
|
|
}
|
|
}
|