2024-01-05 07:20:55 +02:00
|
|
|
import 'package:auto_route/auto_route.dart';
|
2023-06-23 17:44:02 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2023-11-29 06:17:29 +02:00
|
|
|
import 'package:immich_mobile/extensions/asyncvalue_extensions.dart';
|
2023-06-23 17:44:02 +02:00
|
|
|
import 'package:immich_mobile/modules/search/providers/people.provider.dart';
|
|
|
|
import 'package:immich_mobile/modules/search/ui/explore_grid.dart';
|
|
|
|
|
|
|
|
class AllPeoplePage extends HookConsumerWidget {
|
|
|
|
const AllPeoplePage({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
|
|
final curatedPeople = ref.watch(getCuratedPeopleProvider);
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
2023-11-20 16:58:03 +02:00
|
|
|
title: const Text(
|
2023-06-23 17:44:02 +02:00
|
|
|
'all_people_page_title',
|
|
|
|
).tr(),
|
|
|
|
leading: IconButton(
|
2024-01-05 07:20:55 +02:00
|
|
|
onPressed: () => context.popRoute(),
|
2023-06-23 17:44:02 +02:00
|
|
|
icon: const Icon(Icons.arrow_back_ios_rounded),
|
|
|
|
),
|
|
|
|
),
|
2023-11-29 06:17:29 +02:00
|
|
|
body: curatedPeople.widgetWhen(
|
|
|
|
onData: (people) => ExploreGrid(
|
2023-06-23 17:44:02 +02:00
|
|
|
isPeople: true,
|
2023-11-19 18:04:44 +02:00
|
|
|
curatedContent: people,
|
2023-06-23 17:44:02 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|