34 lines
978 B
Dart
34 lines
978 B
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
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(
|
|
leading: SizedBox(
|
|
width: 100,
|
|
height: 100,
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(8),
|
|
child: CachedNetworkImage(imageUrl: imageUrl),
|
|
),
|
|
),
|
|
title: AutoSizeText(
|
|
songTitle,
|
|
overflowReplacement: TextScroll(
|
|
songTitle,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|