mirror of
https://github.com/immich-app/immich.git
synced 2024-12-19 00:32:49 +02:00
bffc2cdf60
* refactor: move all extensions to separate package * refactor(mobile): add BuildContext extension * refactor(mobile): use theme getters from context * refactor(mobile): use media query size from context * refactor(mobile): use auto router methods from context * refactor(mobile): use navigator methods from context --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
48 lines
1.1 KiB
Dart
48 lines
1.1 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|
|
|
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,
|
|
style: context.textTheme.titleSmall,
|
|
),
|
|
TextButton(
|
|
onPressed: onViewAllPressed,
|
|
child: Text(
|
|
'search_page_view_all_button',
|
|
style: TextStyle(
|
|
color: context.primaryColor,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 14.0,
|
|
),
|
|
).tr(),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|