diff --git a/app/ios/Podfile.lock b/app/ios/Podfile.lock index 7e1fe5e1..f54a7357 100644 --- a/app/ios/Podfile.lock +++ b/app/ios/Podfile.lock @@ -958,43 +958,43 @@ PODS: - BoringSSL-GRPC/Implementation (0.0.32): - BoringSSL-GRPC/Interface (= 0.0.32) - BoringSSL-GRPC/Interface (0.0.32) - - cloud_firestore (4.17.5): - - Firebase/Firestore (= 10.25.0) + - cloud_firestore (5.0.0): + - Firebase/Firestore (= 10.27.0) - firebase_core - Flutter - - cloud_functions (4.7.6): - - Firebase/Functions (= 10.25.0) + - cloud_functions (5.0.0): + - Firebase/Functions (= 10.27.0) - firebase_core - Flutter - device_info_plus (0.0.1): - Flutter - - Firebase/Auth (10.25.0): + - Firebase/Auth (10.27.0): - Firebase/CoreOnly - - FirebaseAuth (~> 10.25.0) - - Firebase/CoreOnly (10.25.0): - - FirebaseCore (= 10.25.0) - - Firebase/Firestore (10.25.0): + - FirebaseAuth (~> 10.27.0) + - Firebase/CoreOnly (10.27.0): + - FirebaseCore (= 10.27.0) + - Firebase/Firestore (10.27.0): - Firebase/CoreOnly - - FirebaseFirestore (~> 10.25.0) - - Firebase/Functions (10.25.0): + - FirebaseFirestore (~> 10.27.0) + - Firebase/Functions (10.27.0): - Firebase/CoreOnly - - FirebaseFunctions (~> 10.25.0) - - Firebase/Storage (10.25.0): + - FirebaseFunctions (~> 10.27.0) + - Firebase/Storage (10.27.0): - Firebase/CoreOnly - - FirebaseStorage (~> 10.25.0) - - firebase_auth (4.20.0): - - Firebase/Auth (= 10.25.0) + - FirebaseStorage (~> 10.27.0) + - firebase_auth (5.0.0): + - Firebase/Auth (= 10.27.0) - firebase_core - Flutter - - firebase_core (2.32.0): - - Firebase/CoreOnly (= 10.25.0) + - firebase_core (3.0.0): + - Firebase/CoreOnly (= 10.27.0) - Flutter - - firebase_storage (11.7.7): - - Firebase/Storage (= 10.25.0) + - firebase_storage (12.0.0): + - Firebase/Storage (= 10.27.0) - firebase_core - Flutter - FirebaseAppCheckInterop (10.27.0) - - FirebaseAuth (10.25.0): + - FirebaseAuth (10.27.0): - FirebaseAppCheckInterop (~> 10.17) - FirebaseCore (~> 10.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.8) @@ -1002,7 +1002,7 @@ PODS: - GTMSessionFetcher/Core (< 4.0, >= 2.1) - RecaptchaInterop (~> 100.0) - FirebaseAuthInterop (10.27.0) - - FirebaseCore (10.25.0): + - FirebaseCore (10.27.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) @@ -1010,12 +1010,12 @@ PODS: - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.27.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseFirestore (10.25.0): + - FirebaseFirestore (10.27.0): - FirebaseCore (~> 10.0) - FirebaseCoreExtension (~> 10.0) - - FirebaseFirestoreInternal (= 10.25.0) + - FirebaseFirestoreInternal (= 10.27.0) - FirebaseSharedSwift (~> 10.0) - - FirebaseFirestoreInternal (10.25.0): + - FirebaseFirestoreInternal (10.27.0): - abseil/algorithm (~> 1.20240116.1) - abseil/base (~> 1.20240116.1) - abseil/container/flat_hash_map (~> 1.20240116.1) @@ -1030,7 +1030,7 @@ PODS: - gRPC-Core (~> 1.62.0) - leveldb-library (~> 1.22) - nanopb (< 2.30911.0, >= 2.30908.0) - - FirebaseFunctions (10.25.0): + - FirebaseFunctions (10.27.0): - FirebaseAppCheckInterop (~> 10.10) - FirebaseAuthInterop (~> 10.25) - FirebaseCore (~> 10.0) @@ -1040,7 +1040,7 @@ PODS: - GTMSessionFetcher/Core (< 4.0, >= 2.1) - FirebaseMessagingInterop (10.27.0) - FirebaseSharedSwift (10.27.0) - - FirebaseStorage (10.25.0): + - FirebaseStorage (10.27.0): - FirebaseAppCheckInterop (~> 10.0) - FirebaseAuthInterop (~> 10.25) - FirebaseCore (~> 10.0) @@ -1174,11 +1174,11 @@ PODS: - image_picker_ios (0.0.1): - Flutter - leveldb-library (1.22.5) - - nanopb (2.30909.1): - - nanopb/decode (= 2.30909.1) - - nanopb/encode (= 2.30909.1) - - nanopb/decode (2.30909.1) - - nanopb/encode (2.30909.1) + - nanopb (2.30910.0): + - nanopb/decode (= 2.30910.0) + - nanopb/encode (= 2.30910.0) + - nanopb/decode (2.30910.0) + - nanopb/encode (2.30910.0) - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): @@ -1282,25 +1282,25 @@ SPEC CHECKSUMS: abseil: d121da9ef7e2ff4cab7666e76c5a3e0915ae08c3 AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa BoringSSL-GRPC: 1e2348957acdbcad360b80a264a90799984b2ba6 - cloud_firestore: 003d53b6b8b392600b7769acf9421cc4f23e5911 - cloud_functions: 1a28a0b6ec4caf864692e54e1f5c1934431510c8 + cloud_firestore: 8cbdffc6eec66f2c2e67f19e4c6f9a872c222d19 + cloud_functions: 800466fd033f2e623a27c006add7be953df28227 device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 - Firebase: 0312a2352584f782ea56f66d91606891d4607f06 - firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235 - firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197 - firebase_storage: 5c0f552d6b27d621429d7fd16ebab4be94a3c954 + Firebase: 26b040b20866a55f55eb3611b9fcf3ae64816b86 + firebase_auth: 17ce83d25a062b2a594e5dfce91a4ad36e3739d5 + firebase_core: 5926464bbb028fef87d2443369b73ada2a8a3608 + firebase_storage: ff66671828d524fc9e36f30cd7ed1909036324c7 FirebaseAppCheckInterop: 0dd062c9926a76332ca5711dbed6f1a9ac540b54 - FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb + FirebaseAuth: 77a012b7e08042bf44d0db835ca2e86e6ca7bbd3 FirebaseAuthInterop: 0344acef098654eaf59f6add4c93254349bc5de4 - FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483 + FirebaseCore: a2b95ae4ce7c83ceecfbbbe3b6f1cddc7415a808 FirebaseCoreExtension: 4ec89dd0c6de93d6becde32122d68b7c35f6bf5d FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862 - FirebaseFirestore: 977ccc27a3caa5d68279f209c3b0450f85b9dc5f - FirebaseFirestoreInternal: 04b8afa77b4e5b84e86ab5ad985193e9573239fa - FirebaseFunctions: 93b1c7f352aec3922925a0e856cb1d6a09197083 + FirebaseFirestore: 7169b75e7db8f9796d4130e3c2157ed444f100d4 + FirebaseFirestoreInternal: 7ba63f170a554ae49392da44f9430e5b7915a7ff + FirebaseFunctions: d95bacf9a201ebabd2df7d2412281538016a07dd FirebaseMessagingInterop: 8e911a5387664e849d316c5cd257c33fa1d37529 FirebaseSharedSwift: a03fe7a59ee646fef71099a887f774fe25d745b8 - FirebaseStorage: 44f4e25073f6fa0d4d8c09f5bec299ee9e4eb985 + FirebaseStorage: 255526c3d04c49874d7a5e3886964a79f77d6f33 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 @@ -1313,7 +1313,7 @@ SPEC CHECKSUMS: image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63 image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 leveldb-library: e8eadf9008a61f9e1dde3978c086d2b6d9b9dc28 - nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 + nanopb: 438bc412db1928dac798aa6fd75726007be04262 package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 @@ -1325,4 +1325,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/app/lib/ui/flow/setting/contact_support/contact_support_screen.dart b/app/lib/ui/flow/setting/contact_support/contact_support_screen.dart index fd4c1151..9cb749e9 100644 --- a/app/lib/ui/flow/setting/contact_support/contact_support_screen.dart +++ b/app/lib/ui/flow/setting/contact_support/contact_support_screen.dart @@ -13,6 +13,7 @@ import 'package:style/indicator/progress_indicator.dart'; import 'package:style/text/app_text_dart.dart'; import 'package:style/text/app_text_field.dart'; import 'package:yourspace_flutter/domain/extenstions/context_extenstions.dart'; +import 'package:yourspace_flutter/ui/components/error_snakebar.dart'; import 'package:yourspace_flutter/ui/flow/setting/contact_support/contact_support_view_model.dart'; import '../../../components/app_page.dart'; @@ -33,6 +34,7 @@ class _ContactSupportScreenState extends ConsumerState { notifier = ref.watch(contactSupportViewStateProvider.notifier); final state = ref.watch(contactSupportViewStateProvider); _observePop(); + _observeError(); return AppPage( title: context.l10n.contact_support_title, @@ -209,4 +211,12 @@ class _ContactSupportScreenState extends ConsumerState { } }); } + + void _observeError() { + ref.listen(contactSupportViewStateProvider.select((state) => state.error), (previous, next) { + if (next != null) { + showErrorSnackBar(context, next.toString()); + } + }); + } } diff --git a/app/lib/ui/flow/setting/contact_support/contact_support_view_model.dart b/app/lib/ui/flow/setting/contact_support/contact_support_view_model.dart index fdff4d9d..e40adc35 100644 --- a/app/lib/ui/flow/setting/contact_support/contact_support_view_model.dart +++ b/app/lib/ui/flow/setting/contact_support/contact_support_view_model.dart @@ -56,6 +56,7 @@ class ContactSupportViewNotifier error: error, stackTrace: stackTrace, ); + state = state.copyWith(error: error); } } diff --git a/app/lib/ui/flow/setting/profile/profile_screen.dart b/app/lib/ui/flow/setting/profile/profile_screen.dart index 9e1a4cb0..e04ae45b 100644 --- a/app/lib/ui/flow/setting/profile/profile_screen.dart +++ b/app/lib/ui/flow/setting/profile/profile_screen.dart @@ -17,6 +17,7 @@ import 'package:style/text/app_text_field.dart'; import 'package:yourspace_flutter/domain/extenstions/context_extenstions.dart'; import 'package:yourspace_flutter/ui/app_route.dart'; import 'package:yourspace_flutter/ui/components/app_page.dart'; +import 'package:yourspace_flutter/ui/components/error_snakebar.dart'; import 'package:yourspace_flutter/ui/flow/setting/profile/profile_view_model.dart'; import '../../../../gen/assets.gen.dart'; @@ -40,6 +41,7 @@ class _ProfileScreenState extends ConsumerState { final state = ref.watch(editProfileViewStateProvider); _observePop(); _observeAccountDeleted(); + _observeError(); return AppPage( title: context.l10n.edit_profile_title, @@ -301,4 +303,12 @@ class _ProfileScreenState extends ConsumerState { } }); } + + void _observeError() { + ref.listen(editProfileViewStateProvider.select((state) => state.error), (previous, next) { + if (next != null) { + showErrorSnackBar(context, next.toString()); + } + }); + } } diff --git a/app/lib/ui/flow/setting/profile/profile_view_model.dart b/app/lib/ui/flow/setting/profile/profile_view_model.dart index de875a69..7b8e58e1 100644 --- a/app/lib/ui/flow/setting/profile/profile_view_model.dart +++ b/app/lib/ui/flow/setting/profile/profile_view_model.dart @@ -49,6 +49,7 @@ class EditProfileViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); + state = state.copyWith(error: error); } } @@ -70,6 +71,7 @@ class EditProfileViewNotifier extends StateNotifier { error: error, stackTrace: stack ); + state = state.copyWith(error: error); } } @@ -112,7 +114,7 @@ class EditProfileViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); - state = state.copyWith(profileUrl: '', uploadingImage: false); + state = state.copyWith(profileUrl: '', uploadingImage: false, error: error); onChange(); } } @@ -139,5 +141,6 @@ class EditProfileViewState with _$EditProfileViewState { required TextEditingController email, required TextEditingController phone, required String profileUrl, + Object? error, }) = _EditProfileViewState; } diff --git a/app/lib/ui/flow/setting/profile/profile_view_model.freezed.dart b/app/lib/ui/flow/setting/profile/profile_view_model.freezed.dart index a1acaa11..da035a6a 100644 --- a/app/lib/ui/flow/setting/profile/profile_view_model.freezed.dart +++ b/app/lib/ui/flow/setting/profile/profile_view_model.freezed.dart @@ -29,6 +29,7 @@ mixin _$EditProfileViewState { TextEditingController get email => throw _privateConstructorUsedError; TextEditingController get phone => throw _privateConstructorUsedError; String get profileUrl => throw _privateConstructorUsedError; + Object? get error => throw _privateConstructorUsedError; @JsonKey(ignore: true) $EditProfileViewStateCopyWith get copyWith => @@ -54,7 +55,8 @@ abstract class $EditProfileViewStateCopyWith<$Res> { TextEditingController lastName, TextEditingController email, TextEditingController phone, - String profileUrl}); + String profileUrl, + Object? error}); } /// @nodoc @@ -84,6 +86,7 @@ class _$EditProfileViewStateCopyWithImpl<$Res, Object? email = null, Object? phone = null, Object? profileUrl = null, + Object? error = freezed, }) { return _then(_value.copyWith( saving: null == saving @@ -138,6 +141,7 @@ class _$EditProfileViewStateCopyWithImpl<$Res, ? _value.profileUrl : profileUrl // ignore: cast_nullable_to_non_nullable as String, + error: freezed == error ? _value.error : error, ) as $Val); } } @@ -163,7 +167,8 @@ abstract class _$$EditProfileViewStateImplCopyWith<$Res> TextEditingController lastName, TextEditingController email, TextEditingController phone, - String profileUrl}); + String profileUrl, + Object? error}); } /// @nodoc @@ -190,6 +195,7 @@ class __$$EditProfileViewStateImplCopyWithImpl<$Res> Object? email = null, Object? phone = null, Object? profileUrl = null, + Object? error = freezed, }) { return _then(_$EditProfileViewStateImpl( saving: null == saving @@ -244,6 +250,7 @@ class __$$EditProfileViewStateImplCopyWithImpl<$Res> ? _value.profileUrl : profileUrl // ignore: cast_nullable_to_non_nullable as String, + error: freezed == error ? _value.error : error, )); } } @@ -264,7 +271,8 @@ class _$EditProfileViewStateImpl implements _EditProfileViewState { required this.lastName, required this.email, required this.phone, - required this.profileUrl}); + required this.profileUrl, + this.error}); @override @JsonKey() @@ -300,10 +308,12 @@ class _$EditProfileViewStateImpl implements _EditProfileViewState { final TextEditingController phone; @override final String profileUrl; + @override + final Object? error; @override String toString() { - return 'EditProfileViewState(saving: $saving, saved: $saved, allowSave: $allowSave, enablePhone: $enablePhone, enableEmail: $enableEmail, accountDeleted: $accountDeleted, uploadingImage: $uploadingImage, deletingAccount: $deletingAccount, firstName: $firstName, lastName: $lastName, email: $email, phone: $phone, profileUrl: $profileUrl)'; + return 'EditProfileViewState(saving: $saving, saved: $saved, allowSave: $allowSave, enablePhone: $enablePhone, enableEmail: $enableEmail, accountDeleted: $accountDeleted, uploadingImage: $uploadingImage, deletingAccount: $deletingAccount, firstName: $firstName, lastName: $lastName, email: $email, phone: $phone, profileUrl: $profileUrl, error: $error)'; } @override @@ -332,7 +342,8 @@ class _$EditProfileViewStateImpl implements _EditProfileViewState { (identical(other.email, email) || other.email == email) && (identical(other.phone, phone) || other.phone == phone) && (identical(other.profileUrl, profileUrl) || - other.profileUrl == profileUrl)); + other.profileUrl == profileUrl) && + const DeepCollectionEquality().equals(other.error, error)); } @override @@ -350,7 +361,8 @@ class _$EditProfileViewStateImpl implements _EditProfileViewState { lastName, email, phone, - profileUrl); + profileUrl, + const DeepCollectionEquality().hash(error)); @JsonKey(ignore: true) @override @@ -375,7 +387,8 @@ abstract class _EditProfileViewState implements EditProfileViewState { required final TextEditingController lastName, required final TextEditingController email, required final TextEditingController phone, - required final String profileUrl}) = _$EditProfileViewStateImpl; + required final String profileUrl, + final Object? error}) = _$EditProfileViewStateImpl; @override bool get saving; @@ -404,6 +417,8 @@ abstract class _EditProfileViewState implements EditProfileViewState { @override String get profileUrl; @override + Object? get error; + @override @JsonKey(ignore: true) _$$EditProfileViewStateImplCopyWith<_$EditProfileViewStateImpl> get copyWith => throw _privateConstructorUsedError; diff --git a/app/lib/ui/flow/setting/setting_screen.dart b/app/lib/ui/flow/setting/setting_screen.dart index 3f233969..1af361a2 100644 --- a/app/lib/ui/flow/setting/setting_screen.dart +++ b/app/lib/ui/flow/setting/setting_screen.dart @@ -11,6 +11,7 @@ import 'package:yourspace_flutter/domain/extenstions/context_extenstions.dart'; import 'package:yourspace_flutter/domain/extenstions/widget_extensions.dart'; import 'package:yourspace_flutter/ui/app_route.dart'; import 'package:yourspace_flutter/ui/components/app_page.dart'; +import 'package:yourspace_flutter/ui/components/error_snakebar.dart'; import 'package:yourspace_flutter/ui/components/resume_detector.dart'; import 'package:yourspace_flutter/ui/flow/setting/setting_view_model.dart'; @@ -39,6 +40,7 @@ class _SettingScreenState extends ConsumerState { Widget build(BuildContext context) { final state = ref.watch(settingViewStateProvider); _observeLogOut(); + _observeError(); return AppPage( title: context.l10n.settings_title, @@ -310,4 +312,12 @@ class _SettingScreenState extends ConsumerState { } }); } + + void _observeError() { + ref.listen(settingViewStateProvider.select((state) => state.error), (previous, next) { + if (next != null) { + showErrorSnackBar(context, next.toString()); + } + }); + } } diff --git a/app/lib/ui/flow/setting/setting_view_model.dart b/app/lib/ui/flow/setting/setting_view_model.dart index e0aa9555..0c72a124 100644 --- a/app/lib/ui/flow/setting/setting_view_model.dart +++ b/app/lib/ui/flow/setting/setting_view_model.dart @@ -50,6 +50,7 @@ class SettingViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); + state = state.copyWith(error: error); } } @@ -64,6 +65,7 @@ class SettingViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); + state = state.copyWith(error: error); } } } @@ -77,5 +79,6 @@ class SettingViewState with _$SettingViewState { @Default('') String selectedSpaceName, @Default([]) List spaces, ApiUser? currentUser, + Object? error, }) = _SettingViewState; } diff --git a/app/lib/ui/flow/setting/setting_view_model.freezed.dart b/app/lib/ui/flow/setting/setting_view_model.freezed.dart index cec2d0bc..44202491 100644 --- a/app/lib/ui/flow/setting/setting_view_model.freezed.dart +++ b/app/lib/ui/flow/setting/setting_view_model.freezed.dart @@ -22,6 +22,7 @@ mixin _$SettingViewState { String get selectedSpaceName => throw _privateConstructorUsedError; List get spaces => throw _privateConstructorUsedError; ApiUser? get currentUser => throw _privateConstructorUsedError; + Object? get error => throw _privateConstructorUsedError; @JsonKey(ignore: true) $SettingViewStateCopyWith get copyWith => @@ -40,7 +41,8 @@ abstract class $SettingViewStateCopyWith<$Res> { bool logOut, String selectedSpaceName, List spaces, - ApiUser? currentUser}); + ApiUser? currentUser, + Object? error}); $ApiUserCopyWith<$Res>? get currentUser; } @@ -64,6 +66,7 @@ class _$SettingViewStateCopyWithImpl<$Res, $Val extends SettingViewState> Object? selectedSpaceName = null, Object? spaces = null, Object? currentUser = freezed, + Object? error = freezed, }) { return _then(_value.copyWith( loading: null == loading @@ -90,6 +93,7 @@ class _$SettingViewStateCopyWithImpl<$Res, $Val extends SettingViewState> ? _value.currentUser : currentUser // ignore: cast_nullable_to_non_nullable as ApiUser?, + error: freezed == error ? _value.error : error, ) as $Val); } @@ -120,7 +124,8 @@ abstract class _$$SettingViewStateImplCopyWith<$Res> bool logOut, String selectedSpaceName, List spaces, - ApiUser? currentUser}); + ApiUser? currentUser, + Object? error}); @override $ApiUserCopyWith<$Res>? get currentUser; @@ -143,6 +148,7 @@ class __$$SettingViewStateImplCopyWithImpl<$Res> Object? selectedSpaceName = null, Object? spaces = null, Object? currentUser = freezed, + Object? error = freezed, }) { return _then(_$SettingViewStateImpl( loading: null == loading @@ -169,6 +175,7 @@ class __$$SettingViewStateImplCopyWithImpl<$Res> ? _value.currentUser : currentUser // ignore: cast_nullable_to_non_nullable as ApiUser?, + error: freezed == error ? _value.error : error, )); } } @@ -182,7 +189,8 @@ class _$SettingViewStateImpl implements _SettingViewState { this.logOut = false, this.selectedSpaceName = '', final List spaces = const [], - this.currentUser}) + this.currentUser, + this.error}) : _spaces = spaces; @override @@ -208,10 +216,12 @@ class _$SettingViewStateImpl implements _SettingViewState { @override final ApiUser? currentUser; + @override + final Object? error; @override String toString() { - return 'SettingViewState(loading: $loading, signingOut: $signingOut, logOut: $logOut, selectedSpaceName: $selectedSpaceName, spaces: $spaces, currentUser: $currentUser)'; + return 'SettingViewState(loading: $loading, signingOut: $signingOut, logOut: $logOut, selectedSpaceName: $selectedSpaceName, spaces: $spaces, currentUser: $currentUser, error: $error)'; } @override @@ -227,7 +237,8 @@ class _$SettingViewStateImpl implements _SettingViewState { other.selectedSpaceName == selectedSpaceName) && const DeepCollectionEquality().equals(other._spaces, _spaces) && (identical(other.currentUser, currentUser) || - other.currentUser == currentUser)); + other.currentUser == currentUser) && + const DeepCollectionEquality().equals(other.error, error)); } @override @@ -238,7 +249,8 @@ class _$SettingViewStateImpl implements _SettingViewState { logOut, selectedSpaceName, const DeepCollectionEquality().hash(_spaces), - currentUser); + currentUser, + const DeepCollectionEquality().hash(error)); @JsonKey(ignore: true) @override @@ -255,7 +267,8 @@ abstract class _SettingViewState implements SettingViewState { final bool logOut, final String selectedSpaceName, final List spaces, - final ApiUser? currentUser}) = _$SettingViewStateImpl; + final ApiUser? currentUser, + final Object? error}) = _$SettingViewStateImpl; @override bool get loading; @@ -270,6 +283,8 @@ abstract class _SettingViewState implements SettingViewState { @override ApiUser? get currentUser; @override + Object? get error; + @override @JsonKey(ignore: true) _$$SettingViewStateImplCopyWith<_$SettingViewStateImpl> get copyWith => throw _privateConstructorUsedError; diff --git a/app/lib/ui/flow/setting/space/edit_space_screen.dart b/app/lib/ui/flow/setting/space/edit_space_screen.dart index 09817ebb..01faa496 100644 --- a/app/lib/ui/flow/setting/space/edit_space_screen.dart +++ b/app/lib/ui/flow/setting/space/edit_space_screen.dart @@ -13,6 +13,7 @@ import 'package:style/text/app_text_field.dart'; import 'package:yourspace_flutter/domain/extenstions/context_extenstions.dart'; import 'package:yourspace_flutter/domain/extenstions/widget_extensions.dart'; import 'package:yourspace_flutter/ui/components/app_page.dart'; +import 'package:yourspace_flutter/ui/components/error_snakebar.dart'; import 'package:yourspace_flutter/ui/flow/setting/space/edit_space_view_model.dart'; import '../../../components/alert.dart'; @@ -43,6 +44,7 @@ class _EditSpaceScreenState extends ConsumerState { notifier = ref.watch(editSpaceViewStateProvider.notifier); final state = ref.watch(editSpaceViewStateProvider); _observePop(); + _observeError(); return AppPage( title: state.space?.space.name, @@ -283,4 +285,12 @@ class _EditSpaceScreenState extends ConsumerState { } }); } + + void _observeError() { + ref.listen(editSpaceViewStateProvider.select((state) => state.error), (previous, next) { + if (next != null) { + showErrorSnackBar(context, next.toString()); + } + }); + } } diff --git a/app/lib/ui/flow/setting/space/edit_space_view_model.dart b/app/lib/ui/flow/setting/space/edit_space_view_model.dart index 65801952..dbfba259 100644 --- a/app/lib/ui/flow/setting/space/edit_space_view_model.dart +++ b/app/lib/ui/flow/setting/space/edit_space_view_model.dart @@ -50,6 +50,7 @@ class EditSpaceViewNotifier extends StateNotifier { error: error, stackTrace: stack ); + state = state.copyWith(error: error); } } @@ -69,6 +70,7 @@ class EditSpaceViewNotifier extends StateNotifier { error: error, stackTrace: stack ); + state = state.copyWith(error: error); } } @@ -83,6 +85,7 @@ class EditSpaceViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); + state = state.copyWith(error: error); } } @@ -97,6 +100,7 @@ class EditSpaceViewNotifier extends StateNotifier { error: error, stackTrace: stack, ); + state = state.copyWith(error: error); } } @@ -127,5 +131,6 @@ class EditSpaceViewState with _$EditSpaceViewState { @Default([]) List userInfo, required TextEditingController spaceName, SpaceInfo? space, + Object? error, }) = _EditSpaceViewState; } diff --git a/app/lib/ui/flow/setting/space/edit_space_view_model.freezed.dart b/app/lib/ui/flow/setting/space/edit_space_view_model.freezed.dart index 8ec8a2bf..d461cc41 100644 --- a/app/lib/ui/flow/setting/space/edit_space_view_model.freezed.dart +++ b/app/lib/ui/flow/setting/space/edit_space_view_model.freezed.dart @@ -29,6 +29,7 @@ mixin _$EditSpaceViewState { List get userInfo => throw _privateConstructorUsedError; TextEditingController get spaceName => throw _privateConstructorUsedError; SpaceInfo? get space => throw _privateConstructorUsedError; + Object? get error => throw _privateConstructorUsedError; @JsonKey(ignore: true) $EditSpaceViewStateCopyWith get copyWith => @@ -54,7 +55,8 @@ abstract class $EditSpaceViewStateCopyWith<$Res> { ApiUserInfo? currentUserInfo, List userInfo, TextEditingController spaceName, - SpaceInfo? space}); + SpaceInfo? space, + Object? error}); $ApiUserInfoCopyWith<$Res>? get currentUserInfo; $SpaceInfoCopyWith<$Res>? get space; @@ -86,6 +88,7 @@ class _$EditSpaceViewStateCopyWithImpl<$Res, $Val extends EditSpaceViewState> Object? userInfo = null, Object? spaceName = null, Object? space = freezed, + Object? error = freezed, }) { return _then(_value.copyWith( loading: null == loading @@ -140,6 +143,7 @@ class _$EditSpaceViewStateCopyWithImpl<$Res, $Val extends EditSpaceViewState> ? _value.space : space // ignore: cast_nullable_to_non_nullable as SpaceInfo?, + error: freezed == error ? _value.error : error, ) as $Val); } @@ -189,7 +193,8 @@ abstract class _$$EditSpaceViewStateImplCopyWith<$Res> ApiUserInfo? currentUserInfo, List userInfo, TextEditingController spaceName, - SpaceInfo? space}); + SpaceInfo? space, + Object? error}); @override $ApiUserInfoCopyWith<$Res>? get currentUserInfo; @@ -221,6 +226,7 @@ class __$$EditSpaceViewStateImplCopyWithImpl<$Res> Object? userInfo = null, Object? spaceName = null, Object? space = freezed, + Object? error = freezed, }) { return _then(_$EditSpaceViewStateImpl( loading: null == loading @@ -275,6 +281,7 @@ class __$$EditSpaceViewStateImplCopyWithImpl<$Res> ? _value.space : space // ignore: cast_nullable_to_non_nullable as SpaceInfo?, + error: freezed == error ? _value.error : error, )); } } @@ -295,7 +302,8 @@ class _$EditSpaceViewStateImpl implements _EditSpaceViewState { this.currentUserInfo, final List userInfo = const [], required this.spaceName, - this.space}) + this.space, + this.error}) : _userInfo = userInfo; @override @@ -340,10 +348,12 @@ class _$EditSpaceViewStateImpl implements _EditSpaceViewState { final TextEditingController spaceName; @override final SpaceInfo? space; + @override + final Object? error; @override String toString() { - return 'EditSpaceViewState(loading: $loading, allowSave: $allowSave, saving: $saving, isAdmin: $isAdmin, deleting: $deleting, deleted: $deleted, locationEnabled: $locationEnabled, selectedSpaceName: $selectedSpaceName, currentUserId: $currentUserId, currentUserInfo: $currentUserInfo, userInfo: $userInfo, spaceName: $spaceName, space: $space)'; + return 'EditSpaceViewState(loading: $loading, allowSave: $allowSave, saving: $saving, isAdmin: $isAdmin, deleting: $deleting, deleted: $deleted, locationEnabled: $locationEnabled, selectedSpaceName: $selectedSpaceName, currentUserId: $currentUserId, currentUserInfo: $currentUserInfo, userInfo: $userInfo, spaceName: $spaceName, space: $space, error: $error)'; } @override @@ -370,7 +380,8 @@ class _$EditSpaceViewStateImpl implements _EditSpaceViewState { const DeepCollectionEquality().equals(other._userInfo, _userInfo) && (identical(other.spaceName, spaceName) || other.spaceName == spaceName) && - (identical(other.space, space) || other.space == space)); + (identical(other.space, space) || other.space == space) && + const DeepCollectionEquality().equals(other.error, error)); } @override @@ -388,7 +399,8 @@ class _$EditSpaceViewStateImpl implements _EditSpaceViewState { currentUserInfo, const DeepCollectionEquality().hash(_userInfo), spaceName, - space); + space, + const DeepCollectionEquality().hash(error)); @JsonKey(ignore: true) @override @@ -412,7 +424,8 @@ abstract class _EditSpaceViewState implements EditSpaceViewState { final ApiUserInfo? currentUserInfo, final List userInfo, required final TextEditingController spaceName, - final SpaceInfo? space}) = _$EditSpaceViewStateImpl; + final SpaceInfo? space, + final Object? error}) = _$EditSpaceViewStateImpl; @override bool get loading; @@ -441,6 +454,8 @@ abstract class _EditSpaceViewState implements EditSpaceViewState { @override SpaceInfo? get space; @override + Object? get error; + @override @JsonKey(ignore: true) _$$EditSpaceViewStateImplCopyWith<_$EditSpaceViewStateImpl> get copyWith => throw _privateConstructorUsedError; diff --git a/app/pubspec.lock b/app/pubspec.lock index e556a2ec..1d1e129f 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + sha256: "13e611501ef36044655852215b4f30aed81123654a4f55193d0051a0e8705658" url: "https://pub.dev" source: hosted - version: "1.3.35" + version: "1.3.36" analyzer: dependency: transitive description: @@ -197,50 +197,50 @@ packages: dependency: transitive description: name: cloud_firestore - sha256: a0f161b92610e078b4962d7e6ebeb66dc9cce0ada3514aeee442f68165d78185 + sha256: f5b12f4e2e3f6b38f86a88225e564ed7f7d141b85a237576fa88952e662e8ef1 url: "https://pub.dev" source: hosted - version: "4.17.5" + version: "5.0.0" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: "6a55b319f8d33c307396b9104512e8130a61904528ab7bd8b5402678fca54b81" + sha256: "8f9ae1d13e47cc151f6e9626ccb8b809c406cb1aab801f46e65a902d5a32f2ab" url: "https://pub.dev" source: hosted - version: "6.2.5" + version: "6.2.6" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: "89dfa1304d3da48b3039abbb2865e3d30896ef858e569a16804a99f4362283a9" + sha256: e0fb0e497f03faf83445a84442ada60f97515f5e59e6dd9558ff96ceceb29461 url: "https://pub.dev" source: hosted - version: "3.12.5" + version: "4.0.0" cloud_functions: dependency: transitive description: name: cloud_functions - sha256: ddec68a2fbee603527c009bb20c6bd071559dfa87fda55d9d92052d1ebff5377 + sha256: eef79776144497944e4a90702ee35cd4c01e5f65977182b21d9f9bd5933c236d url: "https://pub.dev" source: hosted - version: "4.7.6" + version: "5.0.0" cloud_functions_platform_interface: dependency: transitive description: name: cloud_functions_platform_interface - sha256: "0c6fca0e64fc2d3a3834d39f99b0ee6f76d96f94bb5acf4593af891df914d175" + sha256: "568d365ce339a086961e688efe5aad9b80adaaa26ebd14383c7ea523037f3506" url: "https://pub.dev" source: hosted - version: "5.5.28" + version: "5.5.29" cloud_functions_web: dependency: transitive description: name: cloud_functions_web - sha256: af536e7c7223c64250c6cc384dc553d76bbacc9b9127389df0c654887f203911 + sha256: d56f499480ab4c89762bcc0ac31b8b975f0ccea69251727e4a3df4b49ce28906 url: "https://pub.dev" source: hosted - version: "4.9.6" + version: "4.9.7" code_builder: dependency: transitive description: @@ -420,34 +420,34 @@ packages: dependency: "direct main" description: name: firebase_auth - sha256: cfc2d970829202eca09e2896f0a5aa7c87302817ecc0bdfa954f026046bf10ba + sha256: fe9ac025fc01290087232e57391d0050341ae69a0f21c3640f66bfa5968fbddf url: "https://pub.dev" source: hosted - version: "4.20.0" + version: "5.0.0" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: a0270e1db3b2098a14cb2a2342b3cd2e7e458e0c391b1f64f6f78b14296ec093 + sha256: "02b4a496febafdd5c23de93ba2b4123765137190bd57567a6c000e36369df44c" url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: "64e067e763c6378b7e774e872f0f59f6812885e43020e25cde08f42e9459837b" + sha256: "0547e3d5ffb68922cff988319ddb4c7091f88be3d2557fa49ed8e30f3855810c" url: "https://pub.dev" source: hosted - version: "5.12.0" + version: "5.12.1" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + sha256: "0d436d29b16fd9844a098ece2a3ce75efc290e5fe0844d282c5e8987173b0d02" url: "https://pub.dev" source: hosted - version: "2.32.0" + version: "3.0.0" firebase_core_platform_interface: dependency: transitive description: @@ -460,34 +460,34 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9" + sha256: "22fcb352744908224fc7be3caae254836099786acfe5df6e9fe901e9c2575a41" url: "https://pub.dev" source: hosted - version: "2.17.0" + version: "2.17.1" firebase_storage: dependency: "direct main" description: name: firebase_storage - sha256: "2ae478ceec9f458c1bcbf0ee3e0100e4e909708979e83f16d5d9fba35a5b42c1" + sha256: a373e93c4713a94d0248cfb7ac43cc7e0da087f8d184fc5c0096909207c925a5 url: "https://pub.dev" source: hosted - version: "11.7.7" + version: "12.0.0" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface - sha256: "4e18662e6a66e2e0e181c06f94707de06d5097d70cfe2b5141bf64660c5b5da9" + sha256: "75abce1fdb9618581fdaaefc9c35d336024a69d1ab8b64bc3e0258d3d3a23409" url: "https://pub.dev" source: hosted - version: "5.1.22" + version: "5.1.23" firebase_storage_web: dependency: transitive description: name: firebase_storage_web - sha256: "3a44aacd38a372efb159f6fe36bb4a7d79823949383816457fd43d3d47602a53" + sha256: "8a57a5565830331d4020bb7edb324451d52db4ccad1bc3647990c7882a200a8b" url: "https://pub.dev" source: hosted - version: "3.9.7" + version: "3.9.8" fixnum: dependency: transitive description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index e3f4e6d8..e9a5d361 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -55,9 +55,9 @@ dependencies: image_cropper: ^6.0.0 # auth - firebase_auth: ^4.16.0 - firebase_core: ^2.23.0 - firebase_storage: ^11.7.7 + firebase_auth: ^5.0.0 + firebase_core: ^3.0.0 + firebase_storage: ^12.0.0 google_sign_in: ^6.1.6 logger: ^2.3.0 flutter_svg: ^2.0.9 diff --git a/data/.flutter-plugins b/data/.flutter-plugins index cb92c5a2..a423ac16 100644 --- a/data/.flutter-plugins +++ b/data/.flutter-plugins @@ -1,15 +1,15 @@ # This is a generated file; do not edit or check into version control. -cloud_firestore=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.8/ -cloud_firestore_web=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-3.10.8/ -cloud_functions=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/ -cloud_functions_web=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.6/ +cloud_firestore=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-5.0.0/ +cloud_firestore_web=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-4.0.0/ +cloud_functions=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-5.0.0/ +cloud_functions_web=/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.7/ device_info_plus=/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/ -firebase_auth=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.16.0/ -firebase_auth_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.8.13/ -firebase_core=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/ -firebase_core_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.0/ -firebase_storage=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/ -firebase_storage_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.7/ +firebase_auth=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-5.0.0/ +firebase_auth_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.1/ +firebase_core=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-3.0.0/ +firebase_core_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.1/ +firebase_storage=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-12.0.0/ +firebase_storage_web=/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.8/ flutter_timezone=/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/ google_sign_in=/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in-6.2.1/ google_sign_in_android=/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.23/ diff --git a/data/.flutter-plugins-dependencies b/data/.flutter-plugins-dependencies index 3592cf60..ec11fe42 100644 --- a/data/.flutter-plugins-dependencies +++ b/data/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.8/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.16.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.8/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.16.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.23/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.2/","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.8/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.16.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.8/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.16.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"cloud_firestore_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-3.10.8/","dependencies":["firebase_core_web"]},{"name":"cloud_functions_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.6/","dependencies":["firebase_core_web"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.8.13/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.0/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.7/","dependencies":["firebase_core_web"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"cloud_functions","dependencies":["cloud_functions_web","firebase_core"]},{"name":"cloud_functions_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"device_info_plus","dependencies":[]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core","firebase_storage_web"]},{"name":"firebase_storage_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_timezone","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-06-05 17:24:04.517991","version":"3.22.1"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-3.0.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-12.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-3.0.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-12.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.23/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.2/","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-3.0.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-12.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-5.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-3.0.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-12.0.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"cloud_firestore_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-4.0.0/","dependencies":["firebase_core_web"]},{"name":"cloud_functions_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.7/","dependencies":["firebase_core_web"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.1/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.1/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.8/","dependencies":["firebase_core_web"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"cloud_functions","dependencies":["cloud_functions_web","firebase_core"]},{"name":"cloud_functions_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"device_info_plus","dependencies":[]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core","firebase_storage_web"]},{"name":"firebase_storage_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_timezone","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-06-06 11:13:52.058144","version":"3.22.1"} \ No newline at end of file diff --git a/data/lib/api/support/api_support_service.dart b/data/lib/api/support/api_support_service.dart index 3ee96dc4..b704e92c 100644 --- a/data/lib/api/support/api_support_service.dart +++ b/data/lib/api/support/api_support_service.dart @@ -34,7 +34,7 @@ class ApiSupportService { } Future submitSupportRequest(String title, String description, List attachments) async { - final report = { + final data = { "title": title, "description": description, "device_name": _device.deviceName, @@ -45,6 +45,6 @@ class ApiSupportService { }; final callable = FirebaseFunctions.instance.httpsCallable('sendSupportRequest'); - await callable.call(report); + await callable.call({'data' : data}); } } diff --git a/data/pubspec.yaml b/data/pubspec.yaml index d5a9a34d..9c32483a 100644 --- a/data/pubspec.yaml +++ b/data/pubspec.yaml @@ -7,10 +7,10 @@ environment: flutter: ">=1.17.0" dependencies: - cloud_firestore: ^4.15.5 - firebase_auth: ^4.16.0 - cloud_functions: ^4.7.6 - firebase_storage: ^11.7.7 + cloud_firestore: ^5.0.0 + firebase_auth: ^5.0.0 + cloud_functions: ^5.0.0 + firebase_storage: ^12.0.0 flutter: sdk: flutter flutter_riverpod: ^2.4.10