aves/lib/widgets/viewer/overlay/slideshow_buttons.dart
2022-12-15 18:59:20 +01:00

44 lines
1.5 KiB
Dart

import 'package:aves/model/actions/slideshow_actions.dart';
import 'package:aves/widgets/common/identity/buttons/overlay_button.dart';
import 'package:aves/widgets/viewer/overlay/viewer_buttons.dart';
import 'package:aves/widgets/viewer/slideshow_page.dart';
import 'package:flutter/material.dart';
class SlideshowButtons extends StatelessWidget {
final Animation<double> scale;
const SlideshowButtons({
super.key,
required this.scale,
});
@override
Widget build(BuildContext context) {
// TODO TLAD [tv] captioned buttons
const padding = ViewerButtonRowContent.padding;
return SafeArea(
child: Padding(
padding: const EdgeInsets.only(left: padding / 2, right: padding / 2, bottom: padding),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SlideshowAction.resume,
SlideshowAction.showInCollection,
]
.map((action) => Padding(
padding: const EdgeInsets.symmetric(horizontal: padding / 2),
child: OverlayButton(
scale: scale,
child: IconButton(
icon: action.getIcon(),
onPressed: () => SlideshowActionNotification(action).dispatch(context),
tooltip: action.getText(context),
),
),
))
.toList(),
),
),
);
}
}