Skip to content

Commit dfa59c6

Browse files
authored
Merge pull request #87 from Onix-Systems/72-error-on-project-generation-with-firebase-auth-integration
fix(Firebase Auth): Add DataResponse.firebaseError factory constructor
2 parents 429506c + 5a45f6d commit dfa59c6

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/arch/domain/entity/common/data_response.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ sealed class DataResponse<T> with _$DataResponse {
1010

1111
const factory DataResponse.success(T data) = _DataResponseSuccess;
1212

13-
const factory DataResponse.undefinedError(
14-
Object? errorObject, [
15-
int? statusCode,
16-
]) = _UndefinedError;
13+
const factory DataResponse.undefinedError(Object? errorObject, [
14+
int? statusCode,
15+
]) = _UndefinedError;
1716

1817
const factory DataResponse.apiError(error, [int? statusCode]) = _ApiError;
1918

@@ -25,6 +24,9 @@ sealed class DataResponse<T> with _$DataResponse {
2524

2625
const factory DataResponse.canceledRequest() = _CanceledRequest;
2726

27+
{{#firebase_auth}}const factory DataResponse.firebaseError(
28+
String code) = _FirebaseError;{{/firebase_auth}}
29+
2830
bool isSuccess() => this is _DataResponseSuccess;
2931

3032
bool isError() => this is! _DataResponseSuccess;

pubspec.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,10 @@ packages:
601601
dependency: "direct main"
602602
description:
603603
name: intl
604-
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
604+
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
605605
url: "https://pub.dev"
606606
source: hosted
607-
version: "0.18.1"
607+
version: "0.19.0"
608608
intl_utils:
609609
dependency: "direct main"
610610
description:
@@ -649,26 +649,26 @@ packages:
649649
dependency: transitive
650650
description:
651651
name: leak_tracker
652-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
652+
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
653653
url: "https://pub.dev"
654654
source: hosted
655-
version: "10.0.0"
655+
version: "10.0.4"
656656
leak_tracker_flutter_testing:
657657
dependency: transitive
658658
description:
659659
name: leak_tracker_flutter_testing
660-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
660+
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
661661
url: "https://pub.dev"
662662
source: hosted
663-
version: "2.0.1"
663+
version: "3.0.3"
664664
leak_tracker_testing:
665665
dependency: transitive
666666
description:
667667
name: leak_tracker_testing
668-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
668+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
669669
url: "https://pub.dev"
670670
source: hosted
671-
version: "2.0.1"
671+
version: "3.0.1"
672672
lints:
673673
dependency: transitive
674674
description:
@@ -721,10 +721,10 @@ packages:
721721
dependency: transitive
722722
description:
723723
name: meta
724-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
724+
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
725725
url: "https://pub.dev"
726726
source: hosted
727-
version: "1.11.0"
727+
version: "1.12.0"
728728
mime:
729729
dependency: transitive
730730
description:
@@ -1118,10 +1118,10 @@ packages:
11181118
dependency: transitive
11191119
description:
11201120
name: test_api
1121-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
1121+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
11221122
url: "https://pub.dev"
11231123
source: hosted
1124-
version: "0.6.1"
1124+
version: "0.7.0"
11251125
timing:
11261126
dependency: transitive
11271127
description:
@@ -1246,10 +1246,10 @@ packages:
12461246
dependency: transitive
12471247
description:
12481248
name: vm_service
1249-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
1249+
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
12501250
url: "https://pub.dev"
12511251
source: hosted
1252-
version: "13.0.0"
1252+
version: "14.2.1"
12531253
watcher:
12541254
dependency: transitive
12551255
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies:
4747
pretty_dio_logger: ^1.3.1
4848
fluttertoast: ^8.2.4
4949
go_router: ^13.1.0
50-
intl: ^0.18.1
50+
intl: ^0.19.0
5151
intl_utils: ^2.8.7
5252
dropdown_button2: ^2.3.9
5353
searchfield: ^0.9.0

0 commit comments

Comments
 (0)