ocarina2/lib/widgets/song_row.dart

35 lines
978 B
Dart
Raw Normal View History

2024-05-23 19:14:08 +02:00
import 'package:auto_size_text/auto_size_text.dart';
2024-05-27 21:46:18 +02:00
import 'package:cached_network_image/cached_network_image.dart';
2024-05-23 19:14:08 +02:00
import 'package:flutter/material.dart';
import 'package:text_scroll/text_scroll.dart';
class SongRow extends StatelessWidget {
const SongRow({required this.imageUrl, required this.songTitle, super.key});
final String imageUrl;
final String songTitle;
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(8),
child: InkWell(
child: ListTile(
2024-05-27 21:46:18 +02:00
leading: SizedBox(
width: 100,
height: 100,
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: CachedNetworkImage(imageUrl: imageUrl),
),
2024-05-23 19:14:08 +02:00
),
title: AutoSizeText(
songTitle,
overflowReplacement: TextScroll(
songTitle,
),
),
),
),
);
}
}