mirror of
https://github.com/immich-app/immich.git
synced 2026-06-06 14:55:17 -04:00
4d6a50c2cb
* refactor: app metadata * refactor to per row store * cleanup * more test * review changes * more refactor * refactor * migrate primary color * migrate dynamic theme * migrate colorfulInterface * cleanup providers * migrate cleanup * migrate mapconfig --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
49 lines
1.5 KiB
Dart
49 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class MapConfig {
|
|
final int relativeDays;
|
|
final bool favoritesOnly;
|
|
final bool includeArchived;
|
|
final ThemeMode themeMode;
|
|
final bool withPartners;
|
|
|
|
const MapConfig({
|
|
this.relativeDays = 0,
|
|
this.favoritesOnly = false,
|
|
this.includeArchived = false,
|
|
this.themeMode = ThemeMode.system,
|
|
this.withPartners = false,
|
|
});
|
|
|
|
MapConfig copyWith({
|
|
int? relativeDays,
|
|
bool? favoritesOnly,
|
|
bool? includeArchived,
|
|
ThemeMode? themeMode,
|
|
bool? withPartners,
|
|
}) => MapConfig(
|
|
relativeDays: relativeDays ?? this.relativeDays,
|
|
favoritesOnly: favoritesOnly ?? this.favoritesOnly,
|
|
includeArchived: includeArchived ?? this.includeArchived,
|
|
themeMode: themeMode ?? this.themeMode,
|
|
withPartners: withPartners ?? this.withPartners,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is MapConfig &&
|
|
other.relativeDays == relativeDays &&
|
|
other.favoritesOnly == favoritesOnly &&
|
|
other.includeArchived == includeArchived &&
|
|
other.themeMode == themeMode &&
|
|
other.withPartners == withPartners);
|
|
|
|
@override
|
|
int get hashCode => Object.hash(relativeDays, favoritesOnly, includeArchived, themeMode, withPartners);
|
|
|
|
@override
|
|
String toString() =>
|
|
'MapConfig(relativeDays: $relativeDays, favoritesOnly: $favoritesOnly, includeArchived: $includeArchived, themeMode: $themeMode, withPartners: $withPartners)';
|
|
}
|