sign_in_bloc.freezed.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  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 'sign_in_bloc.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 _$SignInEventTearOff {
  12. const _$SignInEventTearOff();
  13. SignedInWithUserEmailAndPassword signedInWithUserEmailAndPassword() {
  14. return const SignedInWithUserEmailAndPassword();
  15. }
  16. EmailChanged emailChanged(String email) {
  17. return EmailChanged(
  18. email,
  19. );
  20. }
  21. PasswordChanged passwordChanged(String password) {
  22. return PasswordChanged(
  23. password,
  24. );
  25. }
  26. }
  27. /// @nodoc
  28. const $SignInEvent = _$SignInEventTearOff();
  29. /// @nodoc
  30. mixin _$SignInEvent {
  31. @optionalTypeArgs
  32. TResult when<TResult extends Object?>({
  33. required TResult Function() signedInWithUserEmailAndPassword,
  34. required TResult Function(String email) emailChanged,
  35. required TResult Function(String password) passwordChanged,
  36. }) =>
  37. throw _privateConstructorUsedError;
  38. @optionalTypeArgs
  39. TResult maybeWhen<TResult extends Object?>({
  40. TResult Function()? signedInWithUserEmailAndPassword,
  41. TResult Function(String email)? emailChanged,
  42. TResult Function(String password)? passwordChanged,
  43. required TResult orElse(),
  44. }) =>
  45. throw _privateConstructorUsedError;
  46. @optionalTypeArgs
  47. TResult map<TResult extends Object?>({
  48. required TResult Function(SignedInWithUserEmailAndPassword value)
  49. signedInWithUserEmailAndPassword,
  50. required TResult Function(EmailChanged value) emailChanged,
  51. required TResult Function(PasswordChanged value) passwordChanged,
  52. }) =>
  53. throw _privateConstructorUsedError;
  54. @optionalTypeArgs
  55. TResult maybeMap<TResult extends Object?>({
  56. TResult Function(SignedInWithUserEmailAndPassword value)?
  57. signedInWithUserEmailAndPassword,
  58. TResult Function(EmailChanged value)? emailChanged,
  59. TResult Function(PasswordChanged value)? passwordChanged,
  60. required TResult orElse(),
  61. }) =>
  62. throw _privateConstructorUsedError;
  63. }
  64. /// @nodoc
  65. abstract class $SignInEventCopyWith<$Res> {
  66. factory $SignInEventCopyWith(
  67. SignInEvent value, $Res Function(SignInEvent) then) =
  68. _$SignInEventCopyWithImpl<$Res>;
  69. }
  70. /// @nodoc
  71. class _$SignInEventCopyWithImpl<$Res> implements $SignInEventCopyWith<$Res> {
  72. _$SignInEventCopyWithImpl(this._value, this._then);
  73. final SignInEvent _value;
  74. // ignore: unused_field
  75. final $Res Function(SignInEvent) _then;
  76. }
  77. /// @nodoc
  78. abstract class $SignedInWithUserEmailAndPasswordCopyWith<$Res> {
  79. factory $SignedInWithUserEmailAndPasswordCopyWith(
  80. SignedInWithUserEmailAndPassword value,
  81. $Res Function(SignedInWithUserEmailAndPassword) then) =
  82. _$SignedInWithUserEmailAndPasswordCopyWithImpl<$Res>;
  83. }
  84. /// @nodoc
  85. class _$SignedInWithUserEmailAndPasswordCopyWithImpl<$Res>
  86. extends _$SignInEventCopyWithImpl<$Res>
  87. implements $SignedInWithUserEmailAndPasswordCopyWith<$Res> {
  88. _$SignedInWithUserEmailAndPasswordCopyWithImpl(
  89. SignedInWithUserEmailAndPassword _value,
  90. $Res Function(SignedInWithUserEmailAndPassword) _then)
  91. : super(_value, (v) => _then(v as SignedInWithUserEmailAndPassword));
  92. @override
  93. SignedInWithUserEmailAndPassword get _value =>
  94. super._value as SignedInWithUserEmailAndPassword;
  95. }
  96. /// @nodoc
  97. class _$SignedInWithUserEmailAndPassword
  98. implements SignedInWithUserEmailAndPassword {
  99. const _$SignedInWithUserEmailAndPassword();
  100. @override
  101. String toString() {
  102. return 'SignInEvent.signedInWithUserEmailAndPassword()';
  103. }
  104. @override
  105. bool operator ==(dynamic other) {
  106. return identical(this, other) ||
  107. (other is SignedInWithUserEmailAndPassword);
  108. }
  109. @override
  110. int get hashCode => runtimeType.hashCode;
  111. @override
  112. @optionalTypeArgs
  113. TResult when<TResult extends Object?>({
  114. required TResult Function() signedInWithUserEmailAndPassword,
  115. required TResult Function(String email) emailChanged,
  116. required TResult Function(String password) passwordChanged,
  117. }) {
  118. return signedInWithUserEmailAndPassword();
  119. }
  120. @override
  121. @optionalTypeArgs
  122. TResult maybeWhen<TResult extends Object?>({
  123. TResult Function()? signedInWithUserEmailAndPassword,
  124. TResult Function(String email)? emailChanged,
  125. TResult Function(String password)? passwordChanged,
  126. required TResult orElse(),
  127. }) {
  128. if (signedInWithUserEmailAndPassword != null) {
  129. return signedInWithUserEmailAndPassword();
  130. }
  131. return orElse();
  132. }
  133. @override
  134. @optionalTypeArgs
  135. TResult map<TResult extends Object?>({
  136. required TResult Function(SignedInWithUserEmailAndPassword value)
  137. signedInWithUserEmailAndPassword,
  138. required TResult Function(EmailChanged value) emailChanged,
  139. required TResult Function(PasswordChanged value) passwordChanged,
  140. }) {
  141. return signedInWithUserEmailAndPassword(this);
  142. }
  143. @override
  144. @optionalTypeArgs
  145. TResult maybeMap<TResult extends Object?>({
  146. TResult Function(SignedInWithUserEmailAndPassword value)?
  147. signedInWithUserEmailAndPassword,
  148. TResult Function(EmailChanged value)? emailChanged,
  149. TResult Function(PasswordChanged value)? passwordChanged,
  150. required TResult orElse(),
  151. }) {
  152. if (signedInWithUserEmailAndPassword != null) {
  153. return signedInWithUserEmailAndPassword(this);
  154. }
  155. return orElse();
  156. }
  157. }
  158. abstract class SignedInWithUserEmailAndPassword implements SignInEvent {
  159. const factory SignedInWithUserEmailAndPassword() =
  160. _$SignedInWithUserEmailAndPassword;
  161. }
  162. /// @nodoc
  163. abstract class $EmailChangedCopyWith<$Res> {
  164. factory $EmailChangedCopyWith(
  165. EmailChanged value, $Res Function(EmailChanged) then) =
  166. _$EmailChangedCopyWithImpl<$Res>;
  167. $Res call({String email});
  168. }
  169. /// @nodoc
  170. class _$EmailChangedCopyWithImpl<$Res> extends _$SignInEventCopyWithImpl<$Res>
  171. implements $EmailChangedCopyWith<$Res> {
  172. _$EmailChangedCopyWithImpl(
  173. EmailChanged _value, $Res Function(EmailChanged) _then)
  174. : super(_value, (v) => _then(v as EmailChanged));
  175. @override
  176. EmailChanged get _value => super._value as EmailChanged;
  177. @override
  178. $Res call({
  179. Object? email = freezed,
  180. }) {
  181. return _then(EmailChanged(
  182. email == freezed
  183. ? _value.email
  184. : email // ignore: cast_nullable_to_non_nullable
  185. as String,
  186. ));
  187. }
  188. }
  189. /// @nodoc
  190. class _$EmailChanged implements EmailChanged {
  191. const _$EmailChanged(this.email);
  192. @override
  193. final String email;
  194. @override
  195. String toString() {
  196. return 'SignInEvent.emailChanged(email: $email)';
  197. }
  198. @override
  199. bool operator ==(dynamic other) {
  200. return identical(this, other) ||
  201. (other is EmailChanged &&
  202. (identical(other.email, email) ||
  203. const DeepCollectionEquality().equals(other.email, email)));
  204. }
  205. @override
  206. int get hashCode =>
  207. runtimeType.hashCode ^ const DeepCollectionEquality().hash(email);
  208. @JsonKey(ignore: true)
  209. @override
  210. $EmailChangedCopyWith<EmailChanged> get copyWith =>
  211. _$EmailChangedCopyWithImpl<EmailChanged>(this, _$identity);
  212. @override
  213. @optionalTypeArgs
  214. TResult when<TResult extends Object?>({
  215. required TResult Function() signedInWithUserEmailAndPassword,
  216. required TResult Function(String email) emailChanged,
  217. required TResult Function(String password) passwordChanged,
  218. }) {
  219. return emailChanged(email);
  220. }
  221. @override
  222. @optionalTypeArgs
  223. TResult maybeWhen<TResult extends Object?>({
  224. TResult Function()? signedInWithUserEmailAndPassword,
  225. TResult Function(String email)? emailChanged,
  226. TResult Function(String password)? passwordChanged,
  227. required TResult orElse(),
  228. }) {
  229. if (emailChanged != null) {
  230. return emailChanged(email);
  231. }
  232. return orElse();
  233. }
  234. @override
  235. @optionalTypeArgs
  236. TResult map<TResult extends Object?>({
  237. required TResult Function(SignedInWithUserEmailAndPassword value)
  238. signedInWithUserEmailAndPassword,
  239. required TResult Function(EmailChanged value) emailChanged,
  240. required TResult Function(PasswordChanged value) passwordChanged,
  241. }) {
  242. return emailChanged(this);
  243. }
  244. @override
  245. @optionalTypeArgs
  246. TResult maybeMap<TResult extends Object?>({
  247. TResult Function(SignedInWithUserEmailAndPassword value)?
  248. signedInWithUserEmailAndPassword,
  249. TResult Function(EmailChanged value)? emailChanged,
  250. TResult Function(PasswordChanged value)? passwordChanged,
  251. required TResult orElse(),
  252. }) {
  253. if (emailChanged != null) {
  254. return emailChanged(this);
  255. }
  256. return orElse();
  257. }
  258. }
  259. abstract class EmailChanged implements SignInEvent {
  260. const factory EmailChanged(String email) = _$EmailChanged;
  261. String get email => throw _privateConstructorUsedError;
  262. @JsonKey(ignore: true)
  263. $EmailChangedCopyWith<EmailChanged> get copyWith =>
  264. throw _privateConstructorUsedError;
  265. }
  266. /// @nodoc
  267. abstract class $PasswordChangedCopyWith<$Res> {
  268. factory $PasswordChangedCopyWith(
  269. PasswordChanged value, $Res Function(PasswordChanged) then) =
  270. _$PasswordChangedCopyWithImpl<$Res>;
  271. $Res call({String password});
  272. }
  273. /// @nodoc
  274. class _$PasswordChangedCopyWithImpl<$Res>
  275. extends _$SignInEventCopyWithImpl<$Res>
  276. implements $PasswordChangedCopyWith<$Res> {
  277. _$PasswordChangedCopyWithImpl(
  278. PasswordChanged _value, $Res Function(PasswordChanged) _then)
  279. : super(_value, (v) => _then(v as PasswordChanged));
  280. @override
  281. PasswordChanged get _value => super._value as PasswordChanged;
  282. @override
  283. $Res call({
  284. Object? password = freezed,
  285. }) {
  286. return _then(PasswordChanged(
  287. password == freezed
  288. ? _value.password
  289. : password // ignore: cast_nullable_to_non_nullable
  290. as String,
  291. ));
  292. }
  293. }
  294. /// @nodoc
  295. class _$PasswordChanged implements PasswordChanged {
  296. const _$PasswordChanged(this.password);
  297. @override
  298. final String password;
  299. @override
  300. String toString() {
  301. return 'SignInEvent.passwordChanged(password: $password)';
  302. }
  303. @override
  304. bool operator ==(dynamic other) {
  305. return identical(this, other) ||
  306. (other is PasswordChanged &&
  307. (identical(other.password, password) ||
  308. const DeepCollectionEquality()
  309. .equals(other.password, password)));
  310. }
  311. @override
  312. int get hashCode =>
  313. runtimeType.hashCode ^ const DeepCollectionEquality().hash(password);
  314. @JsonKey(ignore: true)
  315. @override
  316. $PasswordChangedCopyWith<PasswordChanged> get copyWith =>
  317. _$PasswordChangedCopyWithImpl<PasswordChanged>(this, _$identity);
  318. @override
  319. @optionalTypeArgs
  320. TResult when<TResult extends Object?>({
  321. required TResult Function() signedInWithUserEmailAndPassword,
  322. required TResult Function(String email) emailChanged,
  323. required TResult Function(String password) passwordChanged,
  324. }) {
  325. return passwordChanged(password);
  326. }
  327. @override
  328. @optionalTypeArgs
  329. TResult maybeWhen<TResult extends Object?>({
  330. TResult Function()? signedInWithUserEmailAndPassword,
  331. TResult Function(String email)? emailChanged,
  332. TResult Function(String password)? passwordChanged,
  333. required TResult orElse(),
  334. }) {
  335. if (passwordChanged != null) {
  336. return passwordChanged(password);
  337. }
  338. return orElse();
  339. }
  340. @override
  341. @optionalTypeArgs
  342. TResult map<TResult extends Object?>({
  343. required TResult Function(SignedInWithUserEmailAndPassword value)
  344. signedInWithUserEmailAndPassword,
  345. required TResult Function(EmailChanged value) emailChanged,
  346. required TResult Function(PasswordChanged value) passwordChanged,
  347. }) {
  348. return passwordChanged(this);
  349. }
  350. @override
  351. @optionalTypeArgs
  352. TResult maybeMap<TResult extends Object?>({
  353. TResult Function(SignedInWithUserEmailAndPassword value)?
  354. signedInWithUserEmailAndPassword,
  355. TResult Function(EmailChanged value)? emailChanged,
  356. TResult Function(PasswordChanged value)? passwordChanged,
  357. required TResult orElse(),
  358. }) {
  359. if (passwordChanged != null) {
  360. return passwordChanged(this);
  361. }
  362. return orElse();
  363. }
  364. }
  365. abstract class PasswordChanged implements SignInEvent {
  366. const factory PasswordChanged(String password) = _$PasswordChanged;
  367. String get password => throw _privateConstructorUsedError;
  368. @JsonKey(ignore: true)
  369. $PasswordChangedCopyWith<PasswordChanged> get copyWith =>
  370. throw _privateConstructorUsedError;
  371. }
  372. /// @nodoc
  373. class _$SignInStateTearOff {
  374. const _$SignInStateTearOff();
  375. _SignInState call(
  376. {String? email,
  377. String? password,
  378. required bool isSubmitting,
  379. required Option<Either<UserDetail, UserError>> signInFailure}) {
  380. return _SignInState(
  381. email: email,
  382. password: password,
  383. isSubmitting: isSubmitting,
  384. signInFailure: signInFailure,
  385. );
  386. }
  387. }
  388. /// @nodoc
  389. const $SignInState = _$SignInStateTearOff();
  390. /// @nodoc
  391. mixin _$SignInState {
  392. String? get email => throw _privateConstructorUsedError;
  393. String? get password => throw _privateConstructorUsedError;
  394. bool get isSubmitting => throw _privateConstructorUsedError;
  395. Option<Either<UserDetail, UserError>> get signInFailure =>
  396. throw _privateConstructorUsedError;
  397. @JsonKey(ignore: true)
  398. $SignInStateCopyWith<SignInState> get copyWith =>
  399. throw _privateConstructorUsedError;
  400. }
  401. /// @nodoc
  402. abstract class $SignInStateCopyWith<$Res> {
  403. factory $SignInStateCopyWith(
  404. SignInState value, $Res Function(SignInState) then) =
  405. _$SignInStateCopyWithImpl<$Res>;
  406. $Res call(
  407. {String? email,
  408. String? password,
  409. bool isSubmitting,
  410. Option<Either<UserDetail, UserError>> signInFailure});
  411. }
  412. /// @nodoc
  413. class _$SignInStateCopyWithImpl<$Res> implements $SignInStateCopyWith<$Res> {
  414. _$SignInStateCopyWithImpl(this._value, this._then);
  415. final SignInState _value;
  416. // ignore: unused_field
  417. final $Res Function(SignInState) _then;
  418. @override
  419. $Res call({
  420. Object? email = freezed,
  421. Object? password = freezed,
  422. Object? isSubmitting = freezed,
  423. Object? signInFailure = freezed,
  424. }) {
  425. return _then(_value.copyWith(
  426. email: email == freezed
  427. ? _value.email
  428. : email // ignore: cast_nullable_to_non_nullable
  429. as String?,
  430. password: password == freezed
  431. ? _value.password
  432. : password // ignore: cast_nullable_to_non_nullable
  433. as String?,
  434. isSubmitting: isSubmitting == freezed
  435. ? _value.isSubmitting
  436. : isSubmitting // ignore: cast_nullable_to_non_nullable
  437. as bool,
  438. signInFailure: signInFailure == freezed
  439. ? _value.signInFailure
  440. : signInFailure // ignore: cast_nullable_to_non_nullable
  441. as Option<Either<UserDetail, UserError>>,
  442. ));
  443. }
  444. }
  445. /// @nodoc
  446. abstract class _$SignInStateCopyWith<$Res>
  447. implements $SignInStateCopyWith<$Res> {
  448. factory _$SignInStateCopyWith(
  449. _SignInState value, $Res Function(_SignInState) then) =
  450. __$SignInStateCopyWithImpl<$Res>;
  451. @override
  452. $Res call(
  453. {String? email,
  454. String? password,
  455. bool isSubmitting,
  456. Option<Either<UserDetail, UserError>> signInFailure});
  457. }
  458. /// @nodoc
  459. class __$SignInStateCopyWithImpl<$Res> extends _$SignInStateCopyWithImpl<$Res>
  460. implements _$SignInStateCopyWith<$Res> {
  461. __$SignInStateCopyWithImpl(
  462. _SignInState _value, $Res Function(_SignInState) _then)
  463. : super(_value, (v) => _then(v as _SignInState));
  464. @override
  465. _SignInState get _value => super._value as _SignInState;
  466. @override
  467. $Res call({
  468. Object? email = freezed,
  469. Object? password = freezed,
  470. Object? isSubmitting = freezed,
  471. Object? signInFailure = freezed,
  472. }) {
  473. return _then(_SignInState(
  474. email: email == freezed
  475. ? _value.email
  476. : email // ignore: cast_nullable_to_non_nullable
  477. as String?,
  478. password: password == freezed
  479. ? _value.password
  480. : password // ignore: cast_nullable_to_non_nullable
  481. as String?,
  482. isSubmitting: isSubmitting == freezed
  483. ? _value.isSubmitting
  484. : isSubmitting // ignore: cast_nullable_to_non_nullable
  485. as bool,
  486. signInFailure: signInFailure == freezed
  487. ? _value.signInFailure
  488. : signInFailure // ignore: cast_nullable_to_non_nullable
  489. as Option<Either<UserDetail, UserError>>,
  490. ));
  491. }
  492. }
  493. /// @nodoc
  494. class _$_SignInState implements _SignInState {
  495. const _$_SignInState(
  496. {this.email,
  497. this.password,
  498. required this.isSubmitting,
  499. required this.signInFailure});
  500. @override
  501. final String? email;
  502. @override
  503. final String? password;
  504. @override
  505. final bool isSubmitting;
  506. @override
  507. final Option<Either<UserDetail, UserError>> signInFailure;
  508. @override
  509. String toString() {
  510. return 'SignInState(email: $email, password: $password, isSubmitting: $isSubmitting, signInFailure: $signInFailure)';
  511. }
  512. @override
  513. bool operator ==(dynamic other) {
  514. return identical(this, other) ||
  515. (other is _SignInState &&
  516. (identical(other.email, email) ||
  517. const DeepCollectionEquality().equals(other.email, email)) &&
  518. (identical(other.password, password) ||
  519. const DeepCollectionEquality()
  520. .equals(other.password, password)) &&
  521. (identical(other.isSubmitting, isSubmitting) ||
  522. const DeepCollectionEquality()
  523. .equals(other.isSubmitting, isSubmitting)) &&
  524. (identical(other.signInFailure, signInFailure) ||
  525. const DeepCollectionEquality()
  526. .equals(other.signInFailure, signInFailure)));
  527. }
  528. @override
  529. int get hashCode =>
  530. runtimeType.hashCode ^
  531. const DeepCollectionEquality().hash(email) ^
  532. const DeepCollectionEquality().hash(password) ^
  533. const DeepCollectionEquality().hash(isSubmitting) ^
  534. const DeepCollectionEquality().hash(signInFailure);
  535. @JsonKey(ignore: true)
  536. @override
  537. _$SignInStateCopyWith<_SignInState> get copyWith =>
  538. __$SignInStateCopyWithImpl<_SignInState>(this, _$identity);
  539. }
  540. abstract class _SignInState implements SignInState {
  541. const factory _SignInState(
  542. {String? email,
  543. String? password,
  544. required bool isSubmitting,
  545. required Option<Either<UserDetail, UserError>> signInFailure}) =
  546. _$_SignInState;
  547. @override
  548. String? get email => throw _privateConstructorUsedError;
  549. @override
  550. String? get password => throw _privateConstructorUsedError;
  551. @override
  552. bool get isSubmitting => throw _privateConstructorUsedError;
  553. @override
  554. Option<Either<UserDetail, UserError>> get signInFailure =>
  555. throw _privateConstructorUsedError;
  556. @override
  557. @JsonKey(ignore: true)
  558. _$SignInStateCopyWith<_SignInState> get copyWith =>
  559. throw _privateConstructorUsedError;
  560. }