immich/mobile/lib/presentation/actions/slideshow.action.dart
shenlong a048e86217
refactor: mobile cast and slideshow action (#29768)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2026-08-01 08:06:42 +05:30

21 lines
768 B
Dart

import 'dart:async';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/generated/translations.g.dart';
import 'package:immich_mobile/presentation/actions/action.dart';
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
import 'package:immich_mobile/routing/router.dart';
class SlideshowAction extends ActionBuilder {
const SlideshowAction();
@override
ActionItem create(BuildContext context, WidgetRef ref) => .new(
icon: Icons.slideshow,
label: context.t.slideshow,
onAction: () async =>
unawaited(context.pushRoute(DriftSlideshowRoute(timeline: ref.read(timelineServiceProvider)))),
);
}