mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
16 lines
404 B
Dart
16 lines
404 B
Dart
|
|
import 'package:immich_mobile/utils/option.dart';
|
||
|
|
|
||
|
|
class TimeRange {
|
||
|
|
final DateTime? from;
|
||
|
|
final DateTime? to;
|
||
|
|
|
||
|
|
const TimeRange({this.from, this.to});
|
||
|
|
|
||
|
|
TimeRange copyWith({Option<DateTime>? from, Option<DateTime>? to}) {
|
||
|
|
return TimeRange(from: from.patch(this.from), to: to.patch(this.to));
|
||
|
|
}
|
||
|
|
|
||
|
|
TimeRange clearFrom() => TimeRange(to: to);
|
||
|
|
TimeRange clearTo() => TimeRange(from: from);
|
||
|
|
}
|