mucke/lib/presentation/widgets/album_art_list_tile.dart

36 lines
744 B
Dart
Raw Normal View History

2020-03-28 11:08:43 +01:00
import 'package:flutter/material.dart';
import '../utils.dart' as utils;
class AlbumArtListTile extends StatelessWidget {
const AlbumArtListTile(
{Key key, this.title, this.subtitle, this.albumArtPath, this.onTap})
: super(key: key);
final String title;
final String subtitle;
final String albumArtPath;
final Function onTap;
@override
Widget build(BuildContext context) {
return ListTile(
2020-04-04 21:02:42 +02:00
leading: SizedBox(
height: 56,
width: 56,
child: Image(
image: utils.getAlbumImage(albumArtPath),
fit: BoxFit.cover,
2020-03-28 11:08:43 +01:00
),
),
title: Text(
title,
),
subtitle: Text(
subtitle,
),
onTap: () => onTap(),
);
}
}