mucke/lib/presentation/utils.dart
2020-04-04 21:02:42 +02:00

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));
}