mirror of
https://github.com/immich-app/immich.git
synced 2026-05-30 19:35:19 -04:00
0ef04d9baa
* feat(mobile): slideshow view * move slideshow settings to metadata store * remove watch in initState * wrap progress bar in safearea * show slideshow button on remote albums * fix crash on unknown assets * always show slideshow option * add zoom effect * add padding to slideshow settings * chore: styling tweak --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'package:immich_mobile/constants/enums.dart';
|
|
|
|
class SlideshowConfig {
|
|
final bool transition;
|
|
final bool repeat;
|
|
final int duration;
|
|
final SlideshowLook look;
|
|
final SlideshowDirection direction;
|
|
|
|
const SlideshowConfig({
|
|
this.transition = true,
|
|
this.repeat = true,
|
|
this.duration = 5,
|
|
this.look = SlideshowLook.contain,
|
|
this.direction = SlideshowDirection.forward,
|
|
});
|
|
|
|
SlideshowConfig copyWith({
|
|
bool? transition,
|
|
bool? repeat,
|
|
int? duration,
|
|
SlideshowLook? look,
|
|
SlideshowDirection? direction,
|
|
}) => SlideshowConfig(
|
|
transition: transition ?? this.transition,
|
|
repeat: repeat ?? this.repeat,
|
|
duration: duration ?? this.duration,
|
|
look: look ?? this.look,
|
|
direction: direction ?? this.direction,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is SlideshowConfig &&
|
|
other.transition == transition &&
|
|
other.repeat == repeat &&
|
|
other.duration == duration &&
|
|
other.look == look &&
|
|
other.direction == direction);
|
|
|
|
@override
|
|
int get hashCode => Object.hash(transition, repeat, duration, look, direction);
|
|
|
|
@override
|
|
String toString() =>
|
|
'SlideshowConfig(transition: $transition, repeat: $repeat, duration: $duration, look: $look, direction: $direction)';
|
|
}
|