2024-06-18 01:47:04 +10:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:immich_mobile/widgets/search/search_row_title.dart';
|
|
|
|
|
|
|
|
|
|
class SearchRowSection extends StatelessWidget {
|
|
|
|
|
const SearchRowSection({
|
|
|
|
|
super.key,
|
|
|
|
|
required this.onViewAllPressed,
|
|
|
|
|
required this.title,
|
|
|
|
|
this.isEmpty = false,
|
|
|
|
|
required this.child,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
final Function() onViewAllPressed;
|
|
|
|
|
final String title;
|
|
|
|
|
final bool isEmpty;
|
|
|
|
|
final Widget child;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
if (isEmpty) {
|
|
|
|
|
return const SizedBox.shrink();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
2025-07-29 00:34:03 +05:30
|
|
|
child: SearchRowTitle(onViewAllPressed: onViewAllPressed, title: title),
|
2024-06-18 01:47:04 +10:00
|
|
|
),
|
|
|
|
|
child,
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|