2022-10-01 19:19:40 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2023-12-07 16:38:22 +01:00
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
2022-10-01 19:19:40 +02:00
|
|
|
|
|
|
|
class DisableMultiSelectButton extends ConsumerWidget {
|
|
|
|
const DisableMultiSelectButton({
|
2024-01-27 17:14:32 +01:00
|
|
|
super.key,
|
2022-10-01 19:19:40 +02:00
|
|
|
required this.onPressed,
|
|
|
|
required this.selectedItemCount,
|
2024-01-27 17:14:32 +01:00
|
|
|
});
|
2022-10-01 19:19:40 +02:00
|
|
|
|
|
|
|
final Function onPressed;
|
|
|
|
final int selectedItemCount;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
2023-12-07 16:38:22 +01:00
|
|
|
return Align(
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
child: Padding(
|
2024-04-25 16:36:35 +02:00
|
|
|
padding: const EdgeInsets.only(left: 16.0, top: 8.0),
|
2022-10-01 19:19:40 +02:00
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
|
|
child: ElevatedButton.icon(
|
2023-12-07 16:38:22 +01:00
|
|
|
onPressed: () => onPressed(),
|
2024-08-06 16:20:27 +02:00
|
|
|
icon: Icon(
|
|
|
|
Icons.close_rounded,
|
|
|
|
color: context.colorScheme.onPrimary,
|
|
|
|
),
|
2022-10-01 19:19:40 +02:00
|
|
|
label: Text(
|
|
|
|
'$selectedItemCount',
|
2023-12-07 16:38:22 +01:00
|
|
|
style: context.textTheme.titleMedium?.copyWith(
|
|
|
|
height: 2.5,
|
2024-08-06 16:20:27 +02:00
|
|
|
color: context.colorScheme.onPrimary,
|
2022-10-01 19:19:40 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2023-12-07 16:38:22 +01:00
|
|
|
),
|
2022-10-01 19:19:40 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|