aboutsummaryrefslogtreecommitdiff
path: root/lib/view/src/actions/slideshow.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/view/src/actions/slideshow.dart')
-rw-r--r--lib/view/src/actions/slideshow.dart27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/view/src/actions/slideshow.dart b/lib/view/src/actions/slideshow.dart
new file mode 100644
index 0000000..a047322
--- /dev/null
+++ b/lib/view/src/actions/slideshow.dart
@@ -0,0 +1,27 @@
+import 'package:aves/theme/icons.dart';
+import 'package:aves/widgets/common/extensions/build_context.dart';
+import 'package:aves_model/aves_model.dart';
+import 'package:flutter/widgets.dart';
+
+extension ExtraSlideshowActionView on SlideshowAction {
+ String getText(BuildContext context) {
+ final l10n = context.l10n;
+ return switch (this) {
+ SlideshowAction.resume => l10n.slideshowActionResume,
+ SlideshowAction.showInCollection => l10n.slideshowActionShowInCollection,
+ SlideshowAction.cast => l10n.entryActionCast,
+ SlideshowAction.settings => l10n.viewerActionSettings,
+ };
+ }
+
+ Widget getIcon() => Icon(_getIconData());
+
+ IconData _getIconData() {
+ return switch (this) {
+ SlideshowAction.resume => AIcons.play,
+ SlideshowAction.showInCollection => AIcons.allCollection,
+ SlideshowAction.cast => AIcons.cast,
+ SlideshowAction.settings => AIcons.settings,
+ };
+ }
+}