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

PlaylistView/SearchAlbumView are responsive now ArtistProfile album view & tracks view are paginated now
34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:spotify/spotify.dart';
|
|
import 'package:spotube/components/Artist/ArtistProfile.dart';
|
|
import 'package:spotube/components/Shared/LinkText.dart';
|
|
import 'package:spotube/components/Shared/SpotubePageRoute.dart';
|
|
|
|
Widget artistsToClickableArtists(
|
|
List<ArtistSimple> artists, {
|
|
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
|
|
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
|
|
TextStyle textStyle = const TextStyle(),
|
|
}) {
|
|
return Row(
|
|
crossAxisAlignment: crossAxisAlignment,
|
|
mainAxisAlignment: mainAxisAlignment,
|
|
children: artists
|
|
.asMap()
|
|
.entries
|
|
.map(
|
|
(artist) => LinkText(
|
|
(artist.key != artists.length - 1)
|
|
? "${artist.value.name}, "
|
|
: artist.value.name!,
|
|
SpotubePageRoute(
|
|
child: ArtistProfile(artist.value.id!),
|
|
),
|
|
overflow: TextOverflow.ellipsis,
|
|
style: textStyle,
|
|
),
|
|
)
|
|
.toList(),
|
|
);
|
|
}
|