12 lines
324 B
Dart
12 lines
324 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
ImageProvider getAlbumImage(String albumArtPath) {
|
|
// return Image.asset('assets/no_cover.png');
|
|
|
|
if (albumArtPath == null || !File(albumArtPath).existsSync()) {
|
|
return const AssetImage('assets/no_cover.png');
|
|
}
|
|
return FileImage(File(albumArtPath));
|
|
}
|