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 {
|
2025-07-29 00:34:03 +05:30
|
|
|
const DisableMultiSelectButton({super.key, required this.onPressed, required this.selectedItemCount});
|
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 08:36:35 -06: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(),
|
2025-07-29 00:34:03 +05:30
|
|
|
icon: Icon(Icons.close_rounded, color: context.colorScheme.onPrimary),
|
2022-10-01 19:19:40 +02:00
|
|
|
label: Text(
|
|
|
|
|
'$selectedItemCount',
|
2025-07-29 00:34:03 +05:30
|
|
|
style: context.textTheme.titleMedium?.copyWith(height: 2.5, 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
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|