diff --git a/lib/features/authentication/data/datasource/auth_remote_data_source.dart b/lib/features/authentication/data/datasource/auth_remote_data_source.dart index 812bb90..c210723 100644 --- a/lib/features/authentication/data/datasource/auth_remote_data_source.dart +++ b/lib/features/authentication/data/datasource/auth_remote_data_source.dart @@ -1,5 +1,5 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/shared/data/remote/remote.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/models.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/features/authentication/data/repositories/atuhentication_repository_impl.dart b/lib/features/authentication/data/repositories/atuhentication_repository_impl.dart index 6d63ce0..e4db0cd 100644 --- a/lib/features/authentication/data/repositories/atuhentication_repository_impl.dart +++ b/lib/features/authentication/data/repositories/atuhentication_repository_impl.dart @@ -1,6 +1,6 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/features/authentication/data/datasource/auth_remote_data_source.dart'; import 'package:flutter_project/features/authentication/domain/repositories/auth_repository.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/user/user_model.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/features/authentication/domain/repositories/auth_repository.dart b/lib/features/authentication/domain/repositories/auth_repository.dart index 92ad353..fcb49bd 100644 --- a/lib/features/authentication/domain/repositories/auth_repository.dart +++ b/lib/features/authentication/domain/repositories/auth_repository.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/models.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/features/dashboard/data/datasource/dashboard_remote_datasource.dart b/lib/features/dashboard/data/datasource/dashboard_remote_datasource.dart index 2f88cda..9a23c21 100644 --- a/lib/features/dashboard/data/datasource/dashboard_remote_datasource.dart +++ b/lib/features/dashboard/data/datasource/dashboard_remote_datasource.dart @@ -1,5 +1,5 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/shared/data/remote/remote.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/paginated_response.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; import 'package:flutter_project/shared/globals.dart'; diff --git a/lib/features/dashboard/data/repositories/dashboard_repository.dart b/lib/features/dashboard/data/repositories/dashboard_repository.dart index bbe89fd..a44a083 100644 --- a/lib/features/dashboard/data/repositories/dashboard_repository.dart +++ b/lib/features/dashboard/data/repositories/dashboard_repository.dart @@ -1,6 +1,6 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/features/dashboard/data/datasource/dashboard_remote_datasource.dart'; import 'package:flutter_project/features/dashboard/domain/repositories/dashboard_repository.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/paginated_response.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/features/dashboard/domain/repositories/dashboard_repository.dart b/lib/features/dashboard/domain/repositories/dashboard_repository.dart index a7fdbc7..4800f5c 100644 --- a/lib/features/dashboard/domain/repositories/dashboard_repository.dart +++ b/lib/features/dashboard/domain/repositories/dashboard_repository.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/paginated_response.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/features/dashboard/presentation/providers/state/dashboard_notifier.dart b/lib/features/dashboard/presentation/providers/state/dashboard_notifier.dart index 81f440c..17b748b 100644 --- a/lib/features/dashboard/presentation/providers/state/dashboard_notifier.dart +++ b/lib/features/dashboard/presentation/providers/state/dashboard_notifier.dart @@ -1,6 +1,6 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/features/dashboard/domain/repositories/dashboard_repository.dart'; import 'package:flutter_project/features/dashboard/presentation/providers/state/dashboard_state.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/paginated_response.dart'; import 'package:flutter_project/shared/domain/models/product/product_model.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/services/user_cache_service/data/datasource/user_local_datasource.dart b/lib/services/user_cache_service/data/datasource/user_local_datasource.dart index ad18418..6e21e81 100644 --- a/lib/services/user_cache_service/data/datasource/user_local_datasource.dart +++ b/lib/services/user_cache_service/data/datasource/user_local_datasource.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:dartz/dartz.dart'; import 'package:flutter_project/shared/data/local/storage_service.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/user/user_model.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; import 'package:flutter_project/shared/globals.dart'; diff --git a/lib/services/user_cache_service/data/repositories/user_repository_impl.dart b/lib/services/user_cache_service/data/repositories/user_repository_impl.dart index ac1a25d..e4de5d3 100644 --- a/lib/services/user_cache_service/data/repositories/user_repository_impl.dart +++ b/lib/services/user_cache_service/data/repositories/user_repository_impl.dart @@ -1,6 +1,6 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/services/user_cache_service/data/datasource/user_local_datasource.dart'; import 'package:flutter_project/services/user_cache_service/domain/repositories/user_cache_repository.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/user/user_model.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/services/user_cache_service/domain/repositories/user_cache_repository.dart b/lib/services/user_cache_service/domain/repositories/user_cache_repository.dart index 43b1f86..e7d5c78 100644 --- a/lib/services/user_cache_service/domain/repositories/user_cache_repository.dart +++ b/lib/services/user_cache_service/domain/repositories/user_cache_repository.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/models.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/shared/data/remote/dio_network_service.dart b/lib/shared/data/remote/dio_network_service.dart index fcac116..80be71c 100644 --- a/lib/shared/data/remote/dio_network_service.dart +++ b/lib/shared/data/remote/dio_network_service.dart @@ -1,8 +1,8 @@ -import 'package:dartz/dartz.dart'; import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_project/configs/app_configs.dart'; import 'package:flutter_project/shared/data/remote/network_service.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/response.dart' as response; import 'package:flutter_project/shared/exceptions/http_exception.dart'; import 'package:flutter_project/shared/globals.dart'; diff --git a/lib/shared/data/remote/network_service.dart b/lib/shared/data/remote/network_service.dart index 13b1924..a94e47a 100644 --- a/lib/shared/data/remote/network_service.dart +++ b/lib/shared/data/remote/network_service.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/response.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/lib/shared/domain/models/either.dart b/lib/shared/domain/models/either.dart new file mode 100644 index 0000000..3048231 --- /dev/null +++ b/lib/shared/domain/models/either.dart @@ -0,0 +1,27 @@ +sealed class Either { + const Either(); + factory Either.left(L l) => Left(l); + factory Either.right(R r) => Right(r); + + T fold(T Function(L) left, T Function(R) right) => switch (this) { + Left(:final value) => left(value), + Right(:final value) => right(value), + }; + bool isLeft() => switch (this) { + Left() => true, + Right() => false, + }; + bool isRight() => !isLeft(); +} + +class Left extends Either { + final L _l; + const Left(this._l); + L get value => _l; +} + +class Right extends Either { + final R _r; + const Right(this._r); + R get value => _r; +} diff --git a/lib/shared/domain/models/response.dart b/lib/shared/domain/models/response.dart index 88f461a..bc2a492 100644 --- a/lib/shared/domain/models/response.dart +++ b/lib/shared/domain/models/response.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; class Response { diff --git a/lib/shared/exceptions/http_exception.dart b/lib/shared/exceptions/http_exception.dart index c0b640e..bdebb04 100644 --- a/lib/shared/exceptions/http_exception.dart +++ b/lib/shared/exceptions/http_exception.dart @@ -1,5 +1,5 @@ -import 'package:dartz/dartz.dart'; import 'package:equatable/equatable.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/response.dart'; class AppException implements Exception { diff --git a/lib/shared/mixins/exception_handler_mixin.dart b/lib/shared/mixins/exception_handler_mixin.dart index 1d27854..606cc0a 100644 --- a/lib/shared/mixins/exception_handler_mixin.dart +++ b/lib/shared/mixins/exception_handler_mixin.dart @@ -2,9 +2,9 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; -import 'package:dartz/dartz.dart'; import 'package:dio/dio.dart'; import 'package:flutter_project/shared/data/remote/remote.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/response.dart' as response; import 'package:flutter_project/shared/exceptions/http_exception.dart'; diff --git a/pubspec.lock b/pubspec.lock index c538eb9..cea6313 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,18 +37,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: "02120972925a567c37921fa28ac7e90680c7095dd0e70711353737ec2727cdc6" + sha256: "82f8df1d177416bc6b7a449127d0270ff1f0f633a91f2ceb7a85d4f07c3affa1" url: "https://pub.dev" source: hosted - version: "7.4.0" + version: "7.8.4" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: d0555913cc54153c38b1dd4f69e0d6a623818ca7195e7c1437901d52b2596eec + sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" url: "https://pub.dev" source: hosted - version: "7.1.1" + version: "7.3.2" boolean_selector: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: build - sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" build_config: dependency: transitive description: @@ -85,26 +85,26 @@ packages: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "5e1929ad37d48bd382b124266cb8e521de5548d406a45a5ae6656c13dab73e37" + sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.4.6" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.2.11" built_collection: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.7.0" characters: dependency: transitive description: @@ -149,26 +149,26 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.7.0" collection: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - sha256: "8599ae9edca5ff96163fca3e36f8e481ea917d1e71cdad912c084b5579913f34" + sha256: "77a180d6938f78ca7d2382d2240eb626c0f6a735d0bfdce227d8ffb80f95c48b" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" connectivity_plus_platform_interface: dependency: transitive description: @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.6.4" crypto: dependency: transitive description: @@ -205,26 +205,18 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" dart_style: dependency: transitive description: name: dart_style - sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" url: "https://pub.dev" source: hosted - version: "2.3.1" - dartz: - dependency: "direct main" - description: - name: dartz - sha256: e6acf34ad2e31b1eb00948692468c30ab48ac8250e0f0df661e29f12dd252168 - url: "https://pub.dev" - source: hosted - version: "0.10.1" + version: "2.3.2" dbus: dependency: transitive description: @@ -245,10 +237,10 @@ packages: dependency: "direct main" description: name: dio - sha256: a9d76e72985d7087eb7c5e7903224ae52b337131518d127c554b9405936752b8 + sha256: "417e2a6f9d83ab396ec38ff4ea5da6c254da71e4db765ad737a42af6930140b7" url: "https://pub.dev" source: hosted - version: "5.2.1+1" + version: "5.3.3" equatable: dependency: "direct main" description: @@ -269,18 +261,18 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -298,18 +290,18 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" flutter_riverpod: dependency: "direct main" description: name: flutter_riverpod - sha256: b83ac5827baadefd331ea1d85110f34645827ea234ccabf53a655f41901a9bf4 + sha256: "305203d1578f6857675f9730568548b03900ce53afd319f4aa9d2fa943334dbe" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.4.5" flutter_test: dependency: "direct dev" description: flutter @@ -324,18 +316,18 @@ packages: dependency: "direct dev" description: name: freezed - sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445 + sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.5" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" frontend_server_client: dependency: transitive description: @@ -412,10 +404,10 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: "61a60716544392a82726dd0fa1dd6f5f1fd32aec66422b6e229e7b90d52325c4" + sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.7.1" lcov_dart: dependency: transitive description: @@ -444,18 +436,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -524,26 +516,26 @@ packages: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.1" petitparser: dependency: transitive description: @@ -556,18 +548,18 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.6" pool: dependency: transitive description: @@ -576,14 +568,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" pub_semver: dependency: transitive description: @@ -604,66 +588,66 @@ packages: dependency: transitive description: name: riverpod - sha256: "80e48bebc83010d5e67a11c9514af6b44bbac1ec77b4333c8ea65dbc79e2d8ef" + sha256: "2e84315036e64c59affaff7443dea51247bc2fe704461a32f26a27986fb63d55" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.4.5" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "396f85b8afc6865182610c0a2fc470853d56499f75f7499e2a73a9f0539d23d0" + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.2.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749" + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: e014107bb79d6d3297196f4f2d0db54b5d1f85b8ea8ff63b8e8b391a02700feb + sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.4" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9d387433ca65717bbf1be88f4d5bb18f10508917a8fa2fb02e0fd0d7479a9afa" + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "74083203a8eae241e0de4a0d597dbedab3b8fef5563f33cf3c12d7e93c655ca5" + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.1" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "5e588e2efef56916a3b229c3bfe81e6a525665a454519ca51dbcc4236a274173" + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" shelf: dependency: transitive description: @@ -705,18 +689,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" source_helper: dependency: transitive description: name: source_helper - sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" source_map_stack_trace: dependency: transitive description: @@ -737,10 +721,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -801,26 +785,26 @@ packages: dependency: transitive description: name: test - sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4" + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" url: "https://pub.dev" source: hosted - version: "1.24.1" + version: "1.24.3" test_api: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" test_core: dependency: transitive description: name: test_core - sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93" + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.5.3" test_coverage_badge: dependency: "direct dev" description: @@ -857,10 +841,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "11.10.0" watcher: dependency: transitive description: @@ -869,6 +853,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -881,26 +873,26 @@ packages: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" win32: dependency: transitive description: name: win32 - sha256: "7dacfda1edcca378031db9905ad7d7bd56b29fd1a90b0908b71a52a12c41e36b" + sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "5.0.9" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.3" xml: dependency: transitive description: @@ -918,5 +910,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.1.0-185.0.dev <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index 518175f..cf63d2e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,6 @@ dependencies: auto_route: ^7.4.0 connectivity_plus: ^4.0.1 cupertino_icons: ^1.0.2 - dartz: ^0.10.1 dio: ^5.2.1+1 equatable: ^2.0.5 flutter: diff --git a/test/features/authentication/data/datasource/auth_remote_data_source_test.dart b/test/features/authentication/data/datasource/auth_remote_data_source_test.dart index 7dce0f3..17ef93a 100644 --- a/test/features/authentication/data/datasource/auth_remote_data_source_test.dart +++ b/test/features/authentication/data/datasource/auth_remote_data_source_test.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/features/authentication/data/datasource/auth_remote_data_source.dart'; import 'package:flutter_project/shared/data/remote/remote.dart'; import 'package:flutter_project/shared/domain/models/response.dart'; diff --git a/test/features/authentication/data/repositories/atuhentication_repository_impl_test.dart b/test/features/authentication/data/repositories/atuhentication_repository_impl_test.dart index 132a3ec..8613b92 100644 --- a/test/features/authentication/data/repositories/atuhentication_repository_impl_test.dart +++ b/test/features/authentication/data/repositories/atuhentication_repository_impl_test.dart @@ -1,4 +1,4 @@ -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/features/authentication/data/datasource/auth_remote_data_source.dart'; import 'package:flutter_project/features/authentication/data/repositories/atuhentication_repository_impl.dart'; import 'package:flutter_project/features/authentication/domain/repositories/auth_repository.dart'; diff --git a/test/features/authentication/presentation/providers/auth_providers_test.dart b/test/features/authentication/presentation/providers/auth_providers_test.dart index 04288a5..81fc2da 100644 --- a/test/features/authentication/presentation/providers/auth_providers_test.dart +++ b/test/features/authentication/presentation/providers/auth_providers_test.dart @@ -1,8 +1,8 @@ -import 'package:dartz/dartz.dart'; import 'package:flutter_project/features/authentication/domain/repositories/auth_repository.dart'; import 'package:flutter_project/features/authentication/presentation/providers/state/auth_notifier.dart'; import 'package:flutter_project/features/authentication/presentation/providers/state/auth_state.dart'; import 'package:flutter_project/services/user_cache_service/domain/repositories/user_cache_repository.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/shared/domain/models/models.dart'; import 'package:flutter_project/shared/exceptions/http_exception.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/features/dashboard/data/repositories/dashboard_repository_test.dart b/test/features/dashboard/data/repositories/dashboard_repository_test.dart index 208795a..62b0aa6 100644 --- a/test/features/dashboard/data/repositories/dashboard_repository_test.dart +++ b/test/features/dashboard/data/repositories/dashboard_repository_test.dart @@ -1,5 +1,5 @@ //test for filename -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/features/dashboard/data/datasource/dashboard_remote_datasource.dart'; import 'package:flutter_project/features/dashboard/data/repositories/dashboard_repository.dart'; import 'package:flutter_project/features/dashboard/domain/repositories/dashboard_repository.dart'; diff --git a/test/features/dashboard/presentation/providers/dashboard_provider_test.dart b/test/features/dashboard/presentation/providers/dashboard_provider_test.dart index 5805a26..c503102 100644 --- a/test/features/dashboard/presentation/providers/dashboard_provider_test.dart +++ b/test/features/dashboard/presentation/providers/dashboard_provider_test.dart @@ -1,5 +1,5 @@ //test for filename -import 'package:dartz/dartz.dart'; +import 'package:flutter_project/shared/domain/models/either.dart'; import 'package:flutter_project/features/dashboard/domain/repositories/dashboard_repository.dart'; import 'package:flutter_project/features/dashboard/presentation/providers/state/dashboard_notifier.dart'; import 'package:flutter_project/features/dashboard/presentation/providers/state/dashboard_state.dart';