From 6dafcfad307ec46ccb58ca9e8515c75bcd6bbbfa Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sun, 23 Nov 2025 13:06:05 -0500 Subject: [PATCH] gitignore freezed --- .gitignore | 1 + flake.nix | 16 +- lib/models/full_room.freezed.dart | 277 ----------------------- lib/models/homeserver.freezed.dart | 280 ------------------------ lib/models/session_backup.freezed.dart | 289 ------------------------ lib/models/space.freezed.dart | 292 ------------------------- 6 files changed, 9 insertions(+), 1146 deletions(-) delete mode 100644 lib/models/full_room.freezed.dart delete mode 100644 lib/models/homeserver.freezed.dart delete mode 100644 lib/models/session_backup.freezed.dart delete mode 100644 lib/models/space.freezed.dart diff --git a/.gitignore b/.gitignore index e7049de..dfaf03d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ key.properties # Generated Files *.g.dart +*.freezed.dart # Devel Password password.txt \ No newline at end of file diff --git a/flake.nix b/flake.nix index f396875..027db59 100644 --- a/flake.nix +++ b/flake.nix @@ -39,15 +39,15 @@ devShells.default = let - android = pkgs.callPackage ./nix/android.nix { }; + # android = pkgs.callPackage ./nix/android.nix { }; in pkgs.mkShell { packages = with pkgs; [ - jdk17 + # jdk17 cargo (flutter.override { extraPkgConfigPackages = [ pkgs.libsecret ]; }) - android.platform-tools + # android.platform-tools (pkgs.writeShellScriptBin "rustup" (builtins.readFile ./nix/fake-rustup.sh)) ]; @@ -58,12 +58,12 @@ ]) }:./build/linux/x64/debug/plugins/flutter_vodozemac"; - ANDROID_HOME = "${android.androidsdk}/libexec/android-sdk"; - ANDROID_SDK_ROOT = ANDROID_HOME; - JAVA_HOME = pkgs.jdk17; + # ANDROID_HOME = "${android.androidsdk}/libexec/android-sdk"; + # ANDROID_SDK_ROOT = ANDROID_HOME; + # JAVA_HOME = pkgs.jdk17; - TOOLS = "${ANDROID_HOME}/build-tools/${"36.0.0"}"; - GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${TOOLS}/aapt2"; + # TOOLS = "${ANDROID_HOME}/build-tools/${"36.0.0"}"; + # GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${TOOLS}/aapt2"; }; }; }; diff --git a/lib/models/full_room.freezed.dart b/lib/models/full_room.freezed.dart deleted file mode 100644 index 378d228..0000000 --- a/lib/models/full_room.freezed.dart +++ /dev/null @@ -1,277 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'full_room.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; -/// @nodoc -mixin _$FullRoom { - - Room get roomData; String get title; Uri? get avatar; -/// Create a copy of FullRoom -/// with the given fields replaced by the non-null parameter values. -@JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -$FullRoomCopyWith get copyWith => _$FullRoomCopyWithImpl(this as FullRoom, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is FullRoom&&(identical(other.roomData, roomData) || other.roomData == roomData)&&(identical(other.title, title) || other.title == title)&&(identical(other.avatar, avatar) || other.avatar == avatar)); -} - - -@override -int get hashCode => Object.hash(runtimeType,roomData,title,avatar); - -@override -String toString() { - return 'FullRoom(roomData: $roomData, title: $title, avatar: $avatar)'; -} - - -} - -/// @nodoc -abstract mixin class $FullRoomCopyWith<$Res> { - factory $FullRoomCopyWith(FullRoom value, $Res Function(FullRoom) _then) = _$FullRoomCopyWithImpl; -@useResult -$Res call({ - Room roomData, String title, Uri? avatar -}); - - - - -} -/// @nodoc -class _$FullRoomCopyWithImpl<$Res> - implements $FullRoomCopyWith<$Res> { - _$FullRoomCopyWithImpl(this._self, this._then); - - final FullRoom _self; - final $Res Function(FullRoom) _then; - -/// Create a copy of FullRoom -/// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? roomData = null,Object? title = null,Object? avatar = freezed,}) { - return _then(_self.copyWith( -roomData: null == roomData ? _self.roomData : roomData // ignore: cast_nullable_to_non_nullable -as Room,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable -as String,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable -as Uri?, - )); -} - -} - - -/// Adds pattern-matching-related methods to [FullRoom]. -extension FullRoomPatterns on FullRoom { -/// A variant of `map` that fallback to returning `orElse`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeMap(TResult Function( _FullRoom value)? $default,{required TResult orElse(),}){ -final _that = this; -switch (_that) { -case _FullRoom() when $default != null: -return $default(_that);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// Callbacks receives the raw object, upcasted. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case final Subclass2 value: -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult map(TResult Function( _FullRoom value) $default,){ -final _that = this; -switch (_that) { -case _FullRoom(): -return $default(_that);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `map` that fallback to returning `null`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? mapOrNull(TResult? Function( _FullRoom value)? $default,){ -final _that = this; -switch (_that) { -case _FullRoom() when $default != null: -return $default(_that);case _: - return null; - -} -} -/// A variant of `when` that fallback to an `orElse` callback. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeWhen(TResult Function( Room roomData, String title, Uri? avatar)? $default,{required TResult orElse(),}) {final _that = this; -switch (_that) { -case _FullRoom() when $default != null: -return $default(_that.roomData,_that.title,_that.avatar);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// As opposed to `map`, this offers destructuring. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case Subclass2(:final field2): -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult when(TResult Function( Room roomData, String title, Uri? avatar) $default,) {final _that = this; -switch (_that) { -case _FullRoom(): -return $default(_that.roomData,_that.title,_that.avatar);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `when` that fallback to returning `null` -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? whenOrNull(TResult? Function( Room roomData, String title, Uri? avatar)? $default,) {final _that = this; -switch (_that) { -case _FullRoom() when $default != null: -return $default(_that.roomData,_that.title,_that.avatar);case _: - return null; - -} -} - -} - -/// @nodoc - - -class _FullRoom implements FullRoom { - const _FullRoom({required this.roomData, required this.title, required this.avatar}); - - -@override final Room roomData; -@override final String title; -@override final Uri? avatar; - -/// Create a copy of FullRoom -/// with the given fields replaced by the non-null parameter values. -@override @JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -_$FullRoomCopyWith<_FullRoom> get copyWith => __$FullRoomCopyWithImpl<_FullRoom>(this, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _FullRoom&&(identical(other.roomData, roomData) || other.roomData == roomData)&&(identical(other.title, title) || other.title == title)&&(identical(other.avatar, avatar) || other.avatar == avatar)); -} - - -@override -int get hashCode => Object.hash(runtimeType,roomData,title,avatar); - -@override -String toString() { - return 'FullRoom(roomData: $roomData, title: $title, avatar: $avatar)'; -} - - -} - -/// @nodoc -abstract mixin class _$FullRoomCopyWith<$Res> implements $FullRoomCopyWith<$Res> { - factory _$FullRoomCopyWith(_FullRoom value, $Res Function(_FullRoom) _then) = __$FullRoomCopyWithImpl; -@override @useResult -$Res call({ - Room roomData, String title, Uri? avatar -}); - - - - -} -/// @nodoc -class __$FullRoomCopyWithImpl<$Res> - implements _$FullRoomCopyWith<$Res> { - __$FullRoomCopyWithImpl(this._self, this._then); - - final _FullRoom _self; - final $Res Function(_FullRoom) _then; - -/// Create a copy of FullRoom -/// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? roomData = null,Object? title = null,Object? avatar = freezed,}) { - return _then(_FullRoom( -roomData: null == roomData ? _self.roomData : roomData // ignore: cast_nullable_to_non_nullable -as Room,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable -as String,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable -as Uri?, - )); -} - - -} - -// dart format on diff --git a/lib/models/homeserver.freezed.dart b/lib/models/homeserver.freezed.dart deleted file mode 100644 index 5ca7760..0000000 --- a/lib/models/homeserver.freezed.dart +++ /dev/null @@ -1,280 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'homeserver.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; -/// @nodoc -mixin _$Homeserver { - - String get name; String get description; Uri get url; String get iconUrl; -/// Create a copy of Homeserver -/// with the given fields replaced by the non-null parameter values. -@JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -$HomeserverCopyWith get copyWith => _$HomeserverCopyWithImpl(this as Homeserver, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is Homeserver&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl)); -} - - -@override -int get hashCode => Object.hash(runtimeType,name,description,url,iconUrl); - -@override -String toString() { - return 'Homeserver(name: $name, description: $description, url: $url, iconUrl: $iconUrl)'; -} - - -} - -/// @nodoc -abstract mixin class $HomeserverCopyWith<$Res> { - factory $HomeserverCopyWith(Homeserver value, $Res Function(Homeserver) _then) = _$HomeserverCopyWithImpl; -@useResult -$Res call({ - String name, String description, Uri url, String iconUrl -}); - - - - -} -/// @nodoc -class _$HomeserverCopyWithImpl<$Res> - implements $HomeserverCopyWith<$Res> { - _$HomeserverCopyWithImpl(this._self, this._then); - - final Homeserver _self; - final $Res Function(Homeserver) _then; - -/// Create a copy of Homeserver -/// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? description = null,Object? url = null,Object? iconUrl = null,}) { - return _then(_self.copyWith( -name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable -as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable -as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable -as Uri,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable -as String, - )); -} - -} - - -/// Adds pattern-matching-related methods to [Homeserver]. -extension HomeserverPatterns on Homeserver { -/// A variant of `map` that fallback to returning `orElse`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeMap(TResult Function( _Homeserver value)? $default,{required TResult orElse(),}){ -final _that = this; -switch (_that) { -case _Homeserver() when $default != null: -return $default(_that);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// Callbacks receives the raw object, upcasted. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case final Subclass2 value: -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult map(TResult Function( _Homeserver value) $default,){ -final _that = this; -switch (_that) { -case _Homeserver(): -return $default(_that);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `map` that fallback to returning `null`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Homeserver value)? $default,){ -final _that = this; -switch (_that) { -case _Homeserver() when $default != null: -return $default(_that);case _: - return null; - -} -} -/// A variant of `when` that fallback to an `orElse` callback. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeWhen(TResult Function( String name, String description, Uri url, String iconUrl)? $default,{required TResult orElse(),}) {final _that = this; -switch (_that) { -case _Homeserver() when $default != null: -return $default(_that.name,_that.description,_that.url,_that.iconUrl);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// As opposed to `map`, this offers destructuring. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case Subclass2(:final field2): -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult when(TResult Function( String name, String description, Uri url, String iconUrl) $default,) {final _that = this; -switch (_that) { -case _Homeserver(): -return $default(_that.name,_that.description,_that.url,_that.iconUrl);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `when` that fallback to returning `null` -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String description, Uri url, String iconUrl)? $default,) {final _that = this; -switch (_that) { -case _Homeserver() when $default != null: -return $default(_that.name,_that.description,_that.url,_that.iconUrl);case _: - return null; - -} -} - -} - -/// @nodoc - - -class _Homeserver implements Homeserver { - const _Homeserver({required this.name, required this.description, required this.url, required this.iconUrl}); - - -@override final String name; -@override final String description; -@override final Uri url; -@override final String iconUrl; - -/// Create a copy of Homeserver -/// with the given fields replaced by the non-null parameter values. -@override @JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -_$HomeserverCopyWith<_Homeserver> get copyWith => __$HomeserverCopyWithImpl<_Homeserver>(this, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _Homeserver&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl)); -} - - -@override -int get hashCode => Object.hash(runtimeType,name,description,url,iconUrl); - -@override -String toString() { - return 'Homeserver(name: $name, description: $description, url: $url, iconUrl: $iconUrl)'; -} - - -} - -/// @nodoc -abstract mixin class _$HomeserverCopyWith<$Res> implements $HomeserverCopyWith<$Res> { - factory _$HomeserverCopyWith(_Homeserver value, $Res Function(_Homeserver) _then) = __$HomeserverCopyWithImpl; -@override @useResult -$Res call({ - String name, String description, Uri url, String iconUrl -}); - - - - -} -/// @nodoc -class __$HomeserverCopyWithImpl<$Res> - implements _$HomeserverCopyWith<$Res> { - __$HomeserverCopyWithImpl(this._self, this._then); - - final _Homeserver _self; - final $Res Function(_Homeserver) _then; - -/// Create a copy of Homeserver -/// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? description = null,Object? url = null,Object? iconUrl = null,}) { - return _then(_Homeserver( -name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable -as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable -as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable -as Uri,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable -as String, - )); -} - - -} - -// dart format on diff --git a/lib/models/session_backup.freezed.dart b/lib/models/session_backup.freezed.dart deleted file mode 100644 index a25d0fb..0000000 --- a/lib/models/session_backup.freezed.dart +++ /dev/null @@ -1,289 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'session_backup.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; - -/// @nodoc -mixin _$SessionBackup { - - String get accessToken; Uri get homeserver; String get userID; String get deviceID; String get deviceName; -/// Create a copy of SessionBackup -/// with the given fields replaced by the non-null parameter values. -@JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -$SessionBackupCopyWith get copyWith => _$SessionBackupCopyWithImpl(this as SessionBackup, _$identity); - - /// Serializes this SessionBackup to a JSON map. - Map toJson(); - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is SessionBackup&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.userID, userID) || other.userID == userID)&&(identical(other.deviceID, deviceID) || other.deviceID == deviceID)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)); -} - -@JsonKey(includeFromJson: false, includeToJson: false) -@override -int get hashCode => Object.hash(runtimeType,accessToken,homeserver,userID,deviceID,deviceName); - -@override -String toString() { - return 'SessionBackup(accessToken: $accessToken, homeserver: $homeserver, userID: $userID, deviceID: $deviceID, deviceName: $deviceName)'; -} - - -} - -/// @nodoc -abstract mixin class $SessionBackupCopyWith<$Res> { - factory $SessionBackupCopyWith(SessionBackup value, $Res Function(SessionBackup) _then) = _$SessionBackupCopyWithImpl; -@useResult -$Res call({ - String accessToken, Uri homeserver, String userID, String deviceID, String deviceName -}); - - - - -} -/// @nodoc -class _$SessionBackupCopyWithImpl<$Res> - implements $SessionBackupCopyWith<$Res> { - _$SessionBackupCopyWithImpl(this._self, this._then); - - final SessionBackup _self; - final $Res Function(SessionBackup) _then; - -/// Create a copy of SessionBackup -/// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? accessToken = null,Object? homeserver = null,Object? userID = null,Object? deviceID = null,Object? deviceName = null,}) { - return _then(_self.copyWith( -accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable -as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable -as Uri,userID: null == userID ? _self.userID : userID // ignore: cast_nullable_to_non_nullable -as String,deviceID: null == deviceID ? _self.deviceID : deviceID // ignore: cast_nullable_to_non_nullable -as String,deviceName: null == deviceName ? _self.deviceName : deviceName // ignore: cast_nullable_to_non_nullable -as String, - )); -} - -} - - -/// Adds pattern-matching-related methods to [SessionBackup]. -extension SessionBackupPatterns on SessionBackup { -/// A variant of `map` that fallback to returning `orElse`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeMap(TResult Function( _SessionBackup value)? $default,{required TResult orElse(),}){ -final _that = this; -switch (_that) { -case _SessionBackup() when $default != null: -return $default(_that);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// Callbacks receives the raw object, upcasted. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case final Subclass2 value: -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult map(TResult Function( _SessionBackup value) $default,){ -final _that = this; -switch (_that) { -case _SessionBackup(): -return $default(_that);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `map` that fallback to returning `null`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SessionBackup value)? $default,){ -final _that = this; -switch (_that) { -case _SessionBackup() when $default != null: -return $default(_that);case _: - return null; - -} -} -/// A variant of `when` that fallback to an `orElse` callback. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeWhen(TResult Function( String accessToken, Uri homeserver, String userID, String deviceID, String deviceName)? $default,{required TResult orElse(),}) {final _that = this; -switch (_that) { -case _SessionBackup() when $default != null: -return $default(_that.accessToken,_that.homeserver,_that.userID,_that.deviceID,_that.deviceName);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// As opposed to `map`, this offers destructuring. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case Subclass2(:final field2): -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult when(TResult Function( String accessToken, Uri homeserver, String userID, String deviceID, String deviceName) $default,) {final _that = this; -switch (_that) { -case _SessionBackup(): -return $default(_that.accessToken,_that.homeserver,_that.userID,_that.deviceID,_that.deviceName);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `when` that fallback to returning `null` -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String accessToken, Uri homeserver, String userID, String deviceID, String deviceName)? $default,) {final _that = this; -switch (_that) { -case _SessionBackup() when $default != null: -return $default(_that.accessToken,_that.homeserver,_that.userID,_that.deviceID,_that.deviceName);case _: - return null; - -} -} - -} - -/// @nodoc -@JsonSerializable() - -class _SessionBackup implements SessionBackup { - const _SessionBackup({required this.accessToken, required this.homeserver, required this.userID, required this.deviceID, required this.deviceName}); - factory _SessionBackup.fromJson(Map json) => _$SessionBackupFromJson(json); - -@override final String accessToken; -@override final Uri homeserver; -@override final String userID; -@override final String deviceID; -@override final String deviceName; - -/// Create a copy of SessionBackup -/// with the given fields replaced by the non-null parameter values. -@override @JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -_$SessionBackupCopyWith<_SessionBackup> get copyWith => __$SessionBackupCopyWithImpl<_SessionBackup>(this, _$identity); - -@override -Map toJson() { - return _$SessionBackupToJson(this, ); -} - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _SessionBackup&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.userID, userID) || other.userID == userID)&&(identical(other.deviceID, deviceID) || other.deviceID == deviceID)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)); -} - -@JsonKey(includeFromJson: false, includeToJson: false) -@override -int get hashCode => Object.hash(runtimeType,accessToken,homeserver,userID,deviceID,deviceName); - -@override -String toString() { - return 'SessionBackup(accessToken: $accessToken, homeserver: $homeserver, userID: $userID, deviceID: $deviceID, deviceName: $deviceName)'; -} - - -} - -/// @nodoc -abstract mixin class _$SessionBackupCopyWith<$Res> implements $SessionBackupCopyWith<$Res> { - factory _$SessionBackupCopyWith(_SessionBackup value, $Res Function(_SessionBackup) _then) = __$SessionBackupCopyWithImpl; -@override @useResult -$Res call({ - String accessToken, Uri homeserver, String userID, String deviceID, String deviceName -}); - - - - -} -/// @nodoc -class __$SessionBackupCopyWithImpl<$Res> - implements _$SessionBackupCopyWith<$Res> { - __$SessionBackupCopyWithImpl(this._self, this._then); - - final _SessionBackup _self; - final $Res Function(_SessionBackup) _then; - -/// Create a copy of SessionBackup -/// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? accessToken = null,Object? homeserver = null,Object? userID = null,Object? deviceID = null,Object? deviceName = null,}) { - return _then(_SessionBackup( -accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable -as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable -as Uri,userID: null == userID ? _self.userID : userID // ignore: cast_nullable_to_non_nullable -as String,deviceID: null == deviceID ? _self.deviceID : deviceID // ignore: cast_nullable_to_non_nullable -as String,deviceName: null == deviceName ? _self.deviceName : deviceName // ignore: cast_nullable_to_non_nullable -as String, - )); -} - - -} - -// dart format on diff --git a/lib/models/space.freezed.dart b/lib/models/space.freezed.dart deleted file mode 100644 index c733e07..0000000 --- a/lib/models/space.freezed.dart +++ /dev/null @@ -1,292 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'space.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -// dart format off -T _$identity(T value) => value; -/// @nodoc -mixin _$Space { - - String get title; List get children; Client get client; bool get fake; Uri? get avatar; Icon? get icon; -/// Create a copy of Space -/// with the given fields replaced by the non-null parameter values. -@JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -$SpaceCopyWith get copyWith => _$SpaceCopyWithImpl(this as Space, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is Space&&(identical(other.title, title) || other.title == title)&&const DeepCollectionEquality().equals(other.children, children)&&(identical(other.client, client) || other.client == client)&&(identical(other.fake, fake) || other.fake == fake)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.icon, icon) || other.icon == icon)); -} - - -@override -int get hashCode => Object.hash(runtimeType,title,const DeepCollectionEquality().hash(children),client,fake,avatar,icon); - -@override -String toString() { - return 'Space(title: $title, children: $children, client: $client, fake: $fake, avatar: $avatar, icon: $icon)'; -} - - -} - -/// @nodoc -abstract mixin class $SpaceCopyWith<$Res> { - factory $SpaceCopyWith(Space value, $Res Function(Space) _then) = _$SpaceCopyWithImpl; -@useResult -$Res call({ - String title, List children, Client client, bool fake, Uri? avatar, Icon? icon -}); - - - - -} -/// @nodoc -class _$SpaceCopyWithImpl<$Res> - implements $SpaceCopyWith<$Res> { - _$SpaceCopyWithImpl(this._self, this._then); - - final Space _self; - final $Res Function(Space) _then; - -/// Create a copy of Space -/// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? title = null,Object? children = null,Object? client = null,Object? fake = null,Object? avatar = freezed,Object? icon = freezed,}) { - return _then(_self.copyWith( -title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable -as String,children: null == children ? _self.children : children // ignore: cast_nullable_to_non_nullable -as List,client: null == client ? _self.client : client // ignore: cast_nullable_to_non_nullable -as Client,fake: null == fake ? _self.fake : fake // ignore: cast_nullable_to_non_nullable -as bool,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable -as Uri?,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable -as Icon?, - )); -} - -} - - -/// Adds pattern-matching-related methods to [Space]. -extension SpacePatterns on Space { -/// A variant of `map` that fallback to returning `orElse`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeMap(TResult Function( _Space value)? $default,{required TResult orElse(),}){ -final _that = this; -switch (_that) { -case _Space() when $default != null: -return $default(_that);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// Callbacks receives the raw object, upcasted. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case final Subclass2 value: -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult map(TResult Function( _Space value) $default,){ -final _that = this; -switch (_that) { -case _Space(): -return $default(_that);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `map` that fallback to returning `null`. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case final Subclass value: -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Space value)? $default,){ -final _that = this; -switch (_that) { -case _Space() when $default != null: -return $default(_that);case _: - return null; - -} -} -/// A variant of `when` that fallback to an `orElse` callback. -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return orElse(); -/// } -/// ``` - -@optionalTypeArgs TResult maybeWhen(TResult Function( String title, List children, Client client, bool fake, Uri? avatar, Icon? icon)? $default,{required TResult orElse(),}) {final _that = this; -switch (_that) { -case _Space() when $default != null: -return $default(_that.title,_that.children,_that.client,_that.fake,_that.avatar,_that.icon);case _: - return orElse(); - -} -} -/// A `switch`-like method, using callbacks. -/// -/// As opposed to `map`, this offers destructuring. -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case Subclass2(:final field2): -/// return ...; -/// } -/// ``` - -@optionalTypeArgs TResult when(TResult Function( String title, List children, Client client, bool fake, Uri? avatar, Icon? icon) $default,) {final _that = this; -switch (_that) { -case _Space(): -return $default(_that.title,_that.children,_that.client,_that.fake,_that.avatar,_that.icon);case _: - throw StateError('Unexpected subclass'); - -} -} -/// A variant of `when` that fallback to returning `null` -/// -/// It is equivalent to doing: -/// ```dart -/// switch (sealedClass) { -/// case Subclass(:final field): -/// return ...; -/// case _: -/// return null; -/// } -/// ``` - -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String title, List children, Client client, bool fake, Uri? avatar, Icon? icon)? $default,) {final _that = this; -switch (_that) { -case _Space() when $default != null: -return $default(_that.title,_that.children,_that.client,_that.fake,_that.avatar,_that.icon);case _: - return null; - -} -} - -} - -/// @nodoc - - -class _Space implements Space { - const _Space({required this.title, required final List children, required this.client, this.fake = false, this.avatar, this.icon}): _children = children; - - -@override final String title; - final List _children; -@override List get children { - if (_children is EqualUnmodifiableListView) return _children; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_children); -} - -@override final Client client; -@override@JsonKey() final bool fake; -@override final Uri? avatar; -@override final Icon? icon; - -/// Create a copy of Space -/// with the given fields replaced by the non-null parameter values. -@override @JsonKey(includeFromJson: false, includeToJson: false) -@pragma('vm:prefer-inline') -_$SpaceCopyWith<_Space> get copyWith => __$SpaceCopyWithImpl<_Space>(this, _$identity); - - - -@override -bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _Space&&(identical(other.title, title) || other.title == title)&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.client, client) || other.client == client)&&(identical(other.fake, fake) || other.fake == fake)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.icon, icon) || other.icon == icon)); -} - - -@override -int get hashCode => Object.hash(runtimeType,title,const DeepCollectionEquality().hash(_children),client,fake,avatar,icon); - -@override -String toString() { - return 'Space(title: $title, children: $children, client: $client, fake: $fake, avatar: $avatar, icon: $icon)'; -} - - -} - -/// @nodoc -abstract mixin class _$SpaceCopyWith<$Res> implements $SpaceCopyWith<$Res> { - factory _$SpaceCopyWith(_Space value, $Res Function(_Space) _then) = __$SpaceCopyWithImpl; -@override @useResult -$Res call({ - String title, List children, Client client, bool fake, Uri? avatar, Icon? icon -}); - - - - -} -/// @nodoc -class __$SpaceCopyWithImpl<$Res> - implements _$SpaceCopyWith<$Res> { - __$SpaceCopyWithImpl(this._self, this._then); - - final _Space _self; - final $Res Function(_Space) _then; - -/// Create a copy of Space -/// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? title = null,Object? children = null,Object? client = null,Object? fake = null,Object? avatar = freezed,Object? icon = freezed,}) { - return _then(_Space( -title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable -as String,children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable -as List,client: null == client ? _self.client : client // ignore: cast_nullable_to_non_nullable -as Client,fake: null == fake ? _self.fake : fake // ignore: cast_nullable_to_non_nullable -as bool,avatar: freezed == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable -as Uri?,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable -as Icon?, - )); -} - - -} - -// dart format on