mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

Save/Remove album support Add/Remove track from favorite support Easier way to create secrets locally Updated contribution details according newest changes
23 lines
523 B
Dart
23 lines
523 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class HeartButton extends StatelessWidget {
|
|
final bool isLiked;
|
|
final void Function() onPressed;
|
|
const HeartButton({
|
|
required this.isLiked,
|
|
required this.onPressed,
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return IconButton(
|
|
icon: Icon(
|
|
!isLiked ? Icons.favorite_outline_rounded : Icons.favorite_rounded,
|
|
color: isLiked ? Colors.green : null,
|
|
),
|
|
onPressed: onPressed,
|
|
);
|
|
}
|
|
}
|