2022-04-23 19:08:45 -07:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class AlbumActionOutlinedButton extends StatelessWidget {
|
|
|
|
final VoidCallback? onPressed;
|
|
|
|
final String labelText;
|
|
|
|
final IconData iconData;
|
|
|
|
|
2022-07-13 05:23:48 -07:00
|
|
|
const AlbumActionOutlinedButton({
|
|
|
|
Key? key,
|
|
|
|
this.onPressed,
|
|
|
|
required this.labelText,
|
|
|
|
required this.iconData,
|
|
|
|
}) : super(key: key);
|
2022-04-23 19:08:45 -07:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-08-15 16:53:30 -07:00
|
|
|
final isDarkTheme = Theme.of(context).brightness == Brightness.dark;
|
|
|
|
|
2022-04-23 19:08:45 -07:00
|
|
|
return Padding(
|
|
|
|
padding: const EdgeInsets.only(right: 8.0),
|
|
|
|
child: OutlinedButton.icon(
|
2022-05-29 15:32:30 -07:00
|
|
|
style: OutlinedButton.styleFrom(
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(25),
|
2022-04-23 19:08:45 -07:00
|
|
|
),
|
2022-08-15 16:53:30 -07:00
|
|
|
side: BorderSide(
|
2022-05-29 15:32:30 -07:00
|
|
|
width: 1,
|
2022-08-15 16:53:30 -07:00
|
|
|
color: isDarkTheme
|
|
|
|
? const Color.fromARGB(255, 63, 63, 63)
|
|
|
|
: const Color.fromARGB(255, 206, 206, 206),
|
2022-04-23 19:08:45 -07:00
|
|
|
),
|
|
|
|
),
|
2022-08-15 16:53:30 -07:00
|
|
|
icon: Icon(
|
|
|
|
iconData,
|
|
|
|
size: 15,
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
),
|
2022-04-23 19:08:45 -07:00
|
|
|
label: Text(
|
|
|
|
labelText,
|
2022-08-15 16:53:30 -07:00
|
|
|
style: Theme.of(context).textTheme.labelSmall?.copyWith(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
2022-04-23 19:08:45 -07:00
|
|
|
),
|
|
|
|
onPressed: onPressed,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|