auth_state.freezed.dart 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. // 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
  3. part of 'auth_state.dart';
  4. // **************************************************************************
  5. // FreezedGenerator
  6. // **************************************************************************
  7. T _$identity<T>(T value) => value;
  8. final _privateConstructorUsedError = UnsupportedError(
  9. 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
  10. /// @nodoc
  11. class _$AuthStateTearOff {
  12. const _$AuthStateTearOff();
  13. Authenticated authenticated() {
  14. return const Authenticated();
  15. }
  16. Unauthenticated unauthenticated() {
  17. return const Unauthenticated();
  18. }
  19. }
  20. /// @nodoc
  21. const $AuthState = _$AuthStateTearOff();
  22. /// @nodoc
  23. mixin _$AuthState {
  24. @optionalTypeArgs
  25. TResult when<TResult extends Object?>({
  26. required TResult Function() authenticated,
  27. required TResult Function() unauthenticated,
  28. }) =>
  29. throw _privateConstructorUsedError;
  30. @optionalTypeArgs
  31. TResult maybeWhen<TResult extends Object?>({
  32. TResult Function()? authenticated,
  33. TResult Function()? unauthenticated,
  34. required TResult orElse(),
  35. }) =>
  36. throw _privateConstructorUsedError;
  37. @optionalTypeArgs
  38. TResult map<TResult extends Object?>({
  39. required TResult Function(Authenticated value) authenticated,
  40. required TResult Function(Unauthenticated value) unauthenticated,
  41. }) =>
  42. throw _privateConstructorUsedError;
  43. @optionalTypeArgs
  44. TResult maybeMap<TResult extends Object?>({
  45. TResult Function(Authenticated value)? authenticated,
  46. TResult Function(Unauthenticated value)? unauthenticated,
  47. required TResult orElse(),
  48. }) =>
  49. throw _privateConstructorUsedError;
  50. }
  51. /// @nodoc
  52. abstract class $AuthStateCopyWith<$Res> {
  53. factory $AuthStateCopyWith(AuthState value, $Res Function(AuthState) then) =
  54. _$AuthStateCopyWithImpl<$Res>;
  55. }
  56. /// @nodoc
  57. class _$AuthStateCopyWithImpl<$Res> implements $AuthStateCopyWith<$Res> {
  58. _$AuthStateCopyWithImpl(this._value, this._then);
  59. final AuthState _value;
  60. // ignore: unused_field
  61. final $Res Function(AuthState) _then;
  62. }
  63. /// @nodoc
  64. abstract class $AuthenticatedCopyWith<$Res> {
  65. factory $AuthenticatedCopyWith(
  66. Authenticated value, $Res Function(Authenticated) then) =
  67. _$AuthenticatedCopyWithImpl<$Res>;
  68. }
  69. /// @nodoc
  70. class _$AuthenticatedCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res>
  71. implements $AuthenticatedCopyWith<$Res> {
  72. _$AuthenticatedCopyWithImpl(
  73. Authenticated _value, $Res Function(Authenticated) _then)
  74. : super(_value, (v) => _then(v as Authenticated));
  75. @override
  76. Authenticated get _value => super._value as Authenticated;
  77. }
  78. /// @nodoc
  79. class _$Authenticated implements Authenticated {
  80. const _$Authenticated();
  81. @override
  82. String toString() {
  83. return 'AuthState.authenticated()';
  84. }
  85. @override
  86. bool operator ==(dynamic other) {
  87. return identical(this, other) || (other is Authenticated);
  88. }
  89. @override
  90. int get hashCode => runtimeType.hashCode;
  91. @override
  92. @optionalTypeArgs
  93. TResult when<TResult extends Object?>({
  94. required TResult Function() authenticated,
  95. required TResult Function() unauthenticated,
  96. }) {
  97. return authenticated();
  98. }
  99. @override
  100. @optionalTypeArgs
  101. TResult maybeWhen<TResult extends Object?>({
  102. TResult Function()? authenticated,
  103. TResult Function()? unauthenticated,
  104. required TResult orElse(),
  105. }) {
  106. if (authenticated != null) {
  107. return authenticated();
  108. }
  109. return orElse();
  110. }
  111. @override
  112. @optionalTypeArgs
  113. TResult map<TResult extends Object?>({
  114. required TResult Function(Authenticated value) authenticated,
  115. required TResult Function(Unauthenticated value) unauthenticated,
  116. }) {
  117. return authenticated(this);
  118. }
  119. @override
  120. @optionalTypeArgs
  121. TResult maybeMap<TResult extends Object?>({
  122. TResult Function(Authenticated value)? authenticated,
  123. TResult Function(Unauthenticated value)? unauthenticated,
  124. required TResult orElse(),
  125. }) {
  126. if (authenticated != null) {
  127. return authenticated(this);
  128. }
  129. return orElse();
  130. }
  131. }
  132. abstract class Authenticated implements AuthState {
  133. const factory Authenticated() = _$Authenticated;
  134. }
  135. /// @nodoc
  136. abstract class $UnauthenticatedCopyWith<$Res> {
  137. factory $UnauthenticatedCopyWith(
  138. Unauthenticated value, $Res Function(Unauthenticated) then) =
  139. _$UnauthenticatedCopyWithImpl<$Res>;
  140. }
  141. /// @nodoc
  142. class _$UnauthenticatedCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res>
  143. implements $UnauthenticatedCopyWith<$Res> {
  144. _$UnauthenticatedCopyWithImpl(
  145. Unauthenticated _value, $Res Function(Unauthenticated) _then)
  146. : super(_value, (v) => _then(v as Unauthenticated));
  147. @override
  148. Unauthenticated get _value => super._value as Unauthenticated;
  149. }
  150. /// @nodoc
  151. class _$Unauthenticated implements Unauthenticated {
  152. const _$Unauthenticated();
  153. @override
  154. String toString() {
  155. return 'AuthState.unauthenticated()';
  156. }
  157. @override
  158. bool operator ==(dynamic other) {
  159. return identical(this, other) || (other is Unauthenticated);
  160. }
  161. @override
  162. int get hashCode => runtimeType.hashCode;
  163. @override
  164. @optionalTypeArgs
  165. TResult when<TResult extends Object?>({
  166. required TResult Function() authenticated,
  167. required TResult Function() unauthenticated,
  168. }) {
  169. return unauthenticated();
  170. }
  171. @override
  172. @optionalTypeArgs
  173. TResult maybeWhen<TResult extends Object?>({
  174. TResult Function()? authenticated,
  175. TResult Function()? unauthenticated,
  176. required TResult orElse(),
  177. }) {
  178. if (unauthenticated != null) {
  179. return unauthenticated();
  180. }
  181. return orElse();
  182. }
  183. @override
  184. @optionalTypeArgs
  185. TResult map<TResult extends Object?>({
  186. required TResult Function(Authenticated value) authenticated,
  187. required TResult Function(Unauthenticated value) unauthenticated,
  188. }) {
  189. return unauthenticated(this);
  190. }
  191. @override
  192. @optionalTypeArgs
  193. TResult maybeMap<TResult extends Object?>({
  194. TResult Function(Authenticated value)? authenticated,
  195. TResult Function(Unauthenticated value)? unauthenticated,
  196. required TResult orElse(),
  197. }) {
  198. if (unauthenticated != null) {
  199. return unauthenticated(this);
  200. }
  201. return orElse();
  202. }
  203. }
  204. abstract class Unauthenticated implements AuthState {
  205. const factory Unauthenticated() = _$Unauthenticated;
  206. }