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

imageToUrlString uses uuid instead of DateTime.now() seperated parts of Player for reuse accross different sizes of screen's specific widgets integrating go_router to follow declarative route approach
10 lines
316 B
Dart
10 lines
316 B
Dart
import 'package:spotify/spotify.dart';
|
|
import 'package:uuid/uuid.dart' show Uuid;
|
|
|
|
const uuid = Uuid();
|
|
String imageToUrlString(List<Image>? images, {int index = 0}) {
|
|
return images != null && images.isNotEmpty
|
|
? images[0].url!
|
|
: "https://avatars.dicebear.com/api/croodles-neutral/${uuid.v4()}.png";
|
|
}
|