mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
22 lines
515 B
Dart
22 lines
515 B
Dart
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
|
import 'package:spotube/collections/spotube_icons.dart';
|
|
|
|
class BackButton extends StatelessWidget {
|
|
final Color? color;
|
|
final IconData icon;
|
|
const BackButton({
|
|
super.key,
|
|
this.color,
|
|
this.icon = SpotubeIcons.angleLeft,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return IconButton.ghost(
|
|
size: const ButtonSize(.9),
|
|
icon: Icon(icon, color: color),
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
);
|
|
}
|
|
}
|