2022-04-24 04:08:45 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2023-11-09 17:19:53 +01:00
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
2022-04-24 04:08:45 +02:00
|
|
|
|
2024-08-06 16:20:27 +02:00
|
|
|
class AlbumActionFilledButton extends StatelessWidget {
|
2022-04-24 04:08:45 +02:00
|
|
|
final VoidCallback? onPressed;
|
|
|
|
final String labelText;
|
|
|
|
final IconData iconData;
|
|
|
|
|
2024-08-06 16:20:27 +02:00
|
|
|
const AlbumActionFilledButton({
|
2024-01-27 17:14:32 +01:00
|
|
|
super.key,
|
2022-07-13 14:23:48 +02:00
|
|
|
this.onPressed,
|
|
|
|
required this.labelText,
|
|
|
|
required this.iconData,
|
2024-01-27 17:14:32 +01:00
|
|
|
});
|
2022-04-24 04:08:45 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Padding(
|
2023-11-20 15:58:03 +01:00
|
|
|
padding: const EdgeInsets.only(right: 16.0),
|
2024-08-06 16:20:27 +02:00
|
|
|
child: FilledButton.icon(
|
|
|
|
style: FilledButton.styleFrom(
|
2024-08-06 21:39:07 +02:00
|
|
|
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 16),
|
2022-05-30 00:32:30 +02:00
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(25),
|
2022-04-24 04:08:45 +02:00
|
|
|
),
|
2024-08-06 16:20:27 +02:00
|
|
|
backgroundColor: context.colorScheme.surfaceContainerHigh,
|
2022-04-24 04:08:45 +02:00
|
|
|
),
|
2022-08-16 01:53:30 +02:00
|
|
|
icon: Icon(
|
|
|
|
iconData,
|
2023-11-20 15:58:03 +01:00
|
|
|
size: 18,
|
2023-11-09 17:19:53 +01:00
|
|
|
color: context.primaryColor,
|
2022-08-16 01:53:30 +02:00
|
|
|
),
|
2022-04-24 04:08:45 +02:00
|
|
|
label: Text(
|
|
|
|
labelText,
|
2023-11-20 15:58:03 +01:00
|
|
|
style: context.textTheme.labelMedium?.copyWith(
|
|
|
|
fontWeight: FontWeight.w600,
|
2023-11-09 17:19:53 +01:00
|
|
|
),
|
2022-04-24 04:08:45 +02:00
|
|
|
),
|
|
|
|
onPressed: onPressed,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|