refactor: move model to domain

This commit is contained in:
Yaros
2026-05-13 18:54:50 +02:00
parent c64767034d
commit 955f491a66
5 changed files with 19 additions and 16 deletions
@@ -0,0 +1,15 @@
import 'package:immich_mobile/utils/option.dart';
class TimeRange {
final Option<DateTime> from;
final Option<DateTime> to;
const TimeRange({this.from = const None(), this.to = const None()});
TimeRange copyWith({Option<DateTime>? from, Option<DateTime>? to}) {
return TimeRange(from: from ?? this.from, to: to ?? this.to);
}
TimeRange clearFrom() => TimeRange(to: to);
TimeRange clearTo() => TimeRange(from: from);
}