mucke/lib/presentation/widgets/next_song.dart
2020-08-24 16:43:22 +02:00

39 lines
925 B
Dart

import 'package:flutter/material.dart';
import '../../domain/entities/song.dart';
class NextSong extends StatelessWidget {
const NextSong({Key key, this.queue, this.index}) : super(key: key);
final List<Song> queue;
final int index;
@override
Widget build(BuildContext context) {
if (index < queue.length - 1) {
final Song song = queue[index + 1];
return RichText(
text: TextSpan(
style: const TextStyle(
fontSize: 14,
color: Colors.white70,
),
children: [
TextSpan(text: '${song.title}'),
const TextSpan(text: ''),
TextSpan(
text: '${song.artist}',
style: const TextStyle(
fontWeight: FontWeight.w300,
),
),
],
),
);
} else {
return Container(
height: 16.0,
);
}
}
}