2023-06-23 17:44:02 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
2023-11-09 18:19:53 +02:00
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
2023-06-23 17:44:02 +02:00
|
|
|
|
|
|
|
class SearchRowTitle extends StatelessWidget {
|
|
|
|
final Function() onViewAllPressed;
|
|
|
|
final String title;
|
|
|
|
final double top;
|
|
|
|
|
|
|
|
const SearchRowTitle({
|
|
|
|
super.key,
|
|
|
|
required this.onViewAllPressed,
|
|
|
|
required this.title,
|
|
|
|
this.top = 12,
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: 16.0,
|
|
|
|
right: 16.0,
|
|
|
|
top: top,
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
title,
|
2023-11-20 16:58:03 +02:00
|
|
|
style: context.textTheme.bodyLarge?.copyWith(
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
),
|
2023-06-23 17:44:02 +02:00
|
|
|
),
|
|
|
|
TextButton(
|
|
|
|
onPressed: onViewAllPressed,
|
|
|
|
child: Text(
|
|
|
|
'search_page_view_all_button',
|
2023-11-20 16:58:03 +02:00
|
|
|
style: context.textTheme.labelLarge?.copyWith(
|
2023-11-09 18:19:53 +02:00
|
|
|
color: context.primaryColor,
|
2023-06-23 17:44:02 +02:00
|
|
|
),
|
|
|
|
).tr(),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|