sign_in_bloc.freezed.dart 24 KB

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