2025-06-26 19:20:39 +05:30
|
|
|
import 'package:auto_route/auto_route.dart';
|
2025-07-10 10:13:46 -05:00
|
|
|
import 'package:flutter/material.dart';
|
2025-06-26 19:20:39 +05:30
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
2025-07-10 10:13:46 -05:00
|
|
|
import 'package:immich_mobile/domain/models/album/album.model.dart';
|
2025-07-11 10:34:38 -05:00
|
|
|
import 'package:immich_mobile/presentation/widgets/bottom_sheet/remote_album_bottom_sheet.widget.dart';
|
2025-06-26 19:20:39 +05:30
|
|
|
import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart';
|
|
|
|
|
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
|
2025-07-10 10:13:46 -05:00
|
|
|
import 'package:immich_mobile/widgets/common/mesmerizing_sliver_app_bar.dart';
|
2025-06-26 19:20:39 +05:30
|
|
|
|
|
|
|
|
@RoutePage()
|
2025-07-11 10:34:38 -05:00
|
|
|
class RemoteAlbumPage extends StatelessWidget {
|
2025-07-10 10:13:46 -05:00
|
|
|
final RemoteAlbum album;
|
2025-06-26 19:20:39 +05:30
|
|
|
|
2025-07-11 10:34:38 -05:00
|
|
|
const RemoteAlbumPage({super.key, required this.album});
|
2025-06-26 19:20:39 +05:30
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return ProviderScope(
|
|
|
|
|
overrides: [
|
|
|
|
|
timelineServiceProvider.overrideWith(
|
|
|
|
|
(ref) {
|
|
|
|
|
final timelineService = ref
|
|
|
|
|
.watch(timelineFactoryProvider)
|
2025-07-10 10:13:46 -05:00
|
|
|
.remoteAlbum(albumId: album.id);
|
2025-07-01 20:53:20 +05:30
|
|
|
ref.onDispose(timelineService.dispose);
|
2025-06-26 19:20:39 +05:30
|
|
|
return timelineService;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
2025-07-10 10:13:46 -05:00
|
|
|
child: Timeline(
|
|
|
|
|
appBar: MesmerizingSliverAppBar(
|
|
|
|
|
title: album.name,
|
|
|
|
|
icon: Icons.photo_album_outlined,
|
|
|
|
|
),
|
2025-07-11 10:34:38 -05:00
|
|
|
bottomSheet: RemoteAlbumBottomSheet(
|
|
|
|
|
album: album,
|
|
|
|
|
),
|
2025-07-10 10:13:46 -05:00
|
|
|
),
|
2025-06-26 19:20:39 +05:30
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|