diff --git a/android/settings.gradle b/android/settings.gradle index 42a51c65..a9f0eb13 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.7.2" apply false + id "com.android.application" version "8.7.3" apply false id "org.jetbrains.kotlin.android" version "2.0.21" apply false } diff --git a/lib/core/initialization_cubit/initialization_cubit.dart b/lib/core/initialization_cubit/initialization_cubit.dart index aedcc3cd..2bdc881f 100644 --- a/lib/core/initialization_cubit/initialization_cubit.dart +++ b/lib/core/initialization_cubit/initialization_cubit.dart @@ -87,13 +87,17 @@ class InitializationCubit extends Cubit { await subscribeNotifications(wsUrl.userId, client); await subscribeChatMessages(wsUrl.userId, client); - emit(InitializationState.success( - client: client, - ),); + emit( + InitializationState.success( + client: client, + ), + ); } catch (e) { - emit(InitializationState.error( - errorMessage: e.toString(), - ),); + emit( + InitializationState.error( + errorMessage: e.toString(), + ), + ); rethrow; } } diff --git a/lib/features/diary/presentation/bloc/diary_cubit.dart b/lib/features/diary/presentation/bloc/diary_cubit.dart index 9e667a03..ddc35422 100644 --- a/lib/features/diary/presentation/bloc/diary_cubit.dart +++ b/lib/features/diary/presentation/bloc/diary_cubit.dart @@ -155,7 +155,7 @@ class DiaryCubit extends Cubit { await fetchDiary(); } - Future sendProductToModeration({ + Future sendProductToModeration({ required String name, required double energy, required double proteins, diff --git a/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart b/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart index e069b3d9..a3a6d9ad 100644 --- a/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart +++ b/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart @@ -1,7 +1,6 @@ import 'package:eatvio_app/features/diary/presentation/bloc/diary_cubit.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:eatvio_app/core/widgets/custom_text_form_field.dart'; -import 'package:eatvio_app/features/glossary/models/glossary_model.dart'; import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; @@ -28,7 +27,7 @@ class _GlossaryModerationRequestModalWidgetState extends State sendProductToModeration({ + Future sendProductToModeration({ required String name, required double energy, required double proteins, diff --git a/lib/features/diary/services/diary_service.dart b/lib/features/diary/services/diary_service.dart index bb14e8cf..e484ee08 100644 --- a/lib/features/diary/services/diary_service.dart +++ b/lib/features/diary/services/diary_service.dart @@ -3,7 +3,6 @@ import 'package:dio/dio.dart'; import 'package:eatvio_app/features/diary/models/diary_day_model.dart'; import 'package:eatvio_app/features/diary/models/finish_diary_day_model.dart'; import 'package:eatvio_app/features/diary/models/nutrition_model.dart'; -import 'package:eatvio_app/features/glossary/models/glossary_model.dart'; import 'package:retrofit/retrofit.dart'; part 'diary_service.g.dart'; @@ -88,7 +87,7 @@ abstract class DiaryService { }); @POST('/api/diary/product_nutritional_values/sendToModeration') - Future sendProductToModeration({ + Future sendProductToModeration({ @Body() required Map data, }); } diff --git a/lib/features/diary/services/diary_service.g.dart b/lib/features/diary/services/diary_service.g.dart index 13951947..19253e5c 100644 --- a/lib/features/diary/services/diary_service.g.dart +++ b/lib/features/diary/services/diary_service.g.dart @@ -387,14 +387,14 @@ class _DiaryService implements DiaryService { } @override - Future sendProductToModeration( + Future sendProductToModeration( {required Map data}) async { final _extra = {}; final queryParameters = {}; final _headers = {}; final _data = {}; _data.addAll(data); - final _options = _setStreamType(Options( + final _options = _setStreamType(Options( method: 'POST', headers: _headers, extra: _extra, @@ -410,15 +410,7 @@ class _DiaryService implements DiaryService { _dio.options.baseUrl, baseUrl, ))); - final _result = await _dio.fetch>(_options); - late GlossaryModerationModel _value; - try { - _value = GlossaryModerationModel.fromJson(_result.data!); - } on Object catch (e, s) { - errorLogger?.logError(e, s, _options); - rethrow; - } - return _value; + await _dio.fetch(_options); } RequestOptions _setStreamType(RequestOptions requestOptions) { diff --git a/lib/features/feed/presentation/widgets/blog_post_widget.dart b/lib/features/feed/presentation/widgets/blog_post_widget.dart index 3c775084..5c1f021e 100644 --- a/lib/features/feed/presentation/widgets/blog_post_widget.dart +++ b/lib/features/feed/presentation/widgets/blog_post_widget.dart @@ -75,6 +75,7 @@ class _BlogPostWidgetState extends State { height: 1, color: Colors.black87, fontWeight: FontWeight.w500, + fontSize: 16, ), ), const SizedBox(height: 4), @@ -83,6 +84,7 @@ class _BlogPostWidgetState extends State { style: TextStyle( height: 1, color: Colors.black45, + fontSize: 14, ), ), ], @@ -102,6 +104,7 @@ class _BlogPostWidgetState extends State { child: Text( state.feedBlogPostList[widget.index].title, style: TextStyle( + fontSize: 18, fontWeight: FontWeight.w600, color: Colors.black87, ), @@ -117,6 +120,7 @@ class _BlogPostWidgetState extends State { : state.feedBlogPostList[widget.index].description, style: { "*": Style( + fontSize: FontSize(16), color: Colors.black87, ), }, diff --git a/lib/features/profile/models/profile_model.dart b/lib/features/profile/models/profile_model.dart index 3e4c1764..9e793a1b 100644 --- a/lib/features/profile/models/profile_model.dart +++ b/lib/features/profile/models/profile_model.dart @@ -43,7 +43,7 @@ class DiplomasAndCertificatesModel with _$DiplomasAndCertificatesModel { class EducationModel with _$EducationModel { const factory EducationModel({ @JsonKey(name: "has_medical_education") int? hasMedicalEducation, - @JsonKey(name: "completed_cources") Map? completedCourses, + @JsonKey(name: "completed_cources") List? completedCourses, @JsonKey(name: "vk_link") String? vkLink, @JsonKey(name: "insta_link") String? instaLink, @JsonKey(name: "fb_link") String? fbLink, diff --git a/lib/features/profile/models/profile_model.freezed.dart b/lib/features/profile/models/profile_model.freezed.dart index dc863ee9..a349c3f2 100644 --- a/lib/features/profile/models/profile_model.freezed.dart +++ b/lib/features/profile/models/profile_model.freezed.dart @@ -821,7 +821,7 @@ mixin _$EducationModel { @JsonKey(name: "has_medical_education") int? get hasMedicalEducation => throw _privateConstructorUsedError; @JsonKey(name: "completed_cources") - Map? get completedCourses => + List? get completedCourses => throw _privateConstructorUsedError; @JsonKey(name: "vk_link") String? get vkLink => throw _privateConstructorUsedError; @@ -855,7 +855,7 @@ abstract class $EducationModelCopyWith<$Res> { $Res call( {@JsonKey(name: "has_medical_education") int? hasMedicalEducation, @JsonKey(name: "completed_cources") - Map? completedCourses, + List? completedCourses, @JsonKey(name: "vk_link") String? vkLink, @JsonKey(name: "insta_link") String? instaLink, @JsonKey(name: "fb_link") String? fbLink, @@ -896,7 +896,7 @@ class _$EducationModelCopyWithImpl<$Res, $Val extends EducationModel> completedCourses: freezed == completedCourses ? _value.completedCourses : completedCourses // ignore: cast_nullable_to_non_nullable - as Map?, + as List?, vkLink: freezed == vkLink ? _value.vkLink : vkLink // ignore: cast_nullable_to_non_nullable @@ -936,7 +936,7 @@ abstract class _$$EducationModelImplCopyWith<$Res> $Res call( {@JsonKey(name: "has_medical_education") int? hasMedicalEducation, @JsonKey(name: "completed_cources") - Map? completedCourses, + List? completedCourses, @JsonKey(name: "vk_link") String? vkLink, @JsonKey(name: "insta_link") String? instaLink, @JsonKey(name: "fb_link") String? fbLink, @@ -975,7 +975,7 @@ class __$$EducationModelImplCopyWithImpl<$Res> completedCourses: freezed == completedCourses ? _value._completedCourses : completedCourses // ignore: cast_nullable_to_non_nullable - as Map?, + as List?, vkLink: freezed == vkLink ? _value.vkLink : vkLink // ignore: cast_nullable_to_non_nullable @@ -1010,7 +1010,7 @@ class _$EducationModelImpl implements _EducationModel { const _$EducationModelImpl( {@JsonKey(name: "has_medical_education") this.hasMedicalEducation, @JsonKey(name: "completed_cources") - final Map? completedCourses, + final List? completedCourses, @JsonKey(name: "vk_link") this.vkLink, @JsonKey(name: "insta_link") this.instaLink, @JsonKey(name: "fb_link") this.fbLink, @@ -1025,15 +1025,16 @@ class _$EducationModelImpl implements _EducationModel { @override @JsonKey(name: "has_medical_education") final int? hasMedicalEducation; - final Map? _completedCourses; + final List? _completedCourses; @override @JsonKey(name: "completed_cources") - Map? get completedCourses { + List? get completedCourses { final value = _completedCourses; if (value == null) return null; - if (_completedCourses is EqualUnmodifiableMapView) return _completedCourses; + if (_completedCourses is EqualUnmodifiableListView) + return _completedCourses; // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); + return EqualUnmodifiableListView(value); } @override @@ -1114,7 +1115,7 @@ abstract class _EducationModel implements EducationModel { const factory _EducationModel( {@JsonKey(name: "has_medical_education") final int? hasMedicalEducation, @JsonKey(name: "completed_cources") - final Map? completedCourses, + final List? completedCourses, @JsonKey(name: "vk_link") final String? vkLink, @JsonKey(name: "insta_link") final String? instaLink, @JsonKey(name: "fb_link") final String? fbLink, @@ -1131,7 +1132,7 @@ abstract class _EducationModel implements EducationModel { int? get hasMedicalEducation; @override @JsonKey(name: "completed_cources") - Map? get completedCourses; + List? get completedCourses; @override @JsonKey(name: "vk_link") String? get vkLink; diff --git a/lib/features/profile/models/profile_model.g.dart b/lib/features/profile/models/profile_model.g.dart index e8925091..75ff5889 100644 --- a/lib/features/profile/models/profile_model.g.dart +++ b/lib/features/profile/models/profile_model.g.dart @@ -83,11 +83,10 @@ Map _$$DiplomasAndCertificatesModelImplToJson( _$EducationModelImpl _$$EducationModelImplFromJson(Map json) => _$EducationModelImpl( hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(), - completedCourses: - (json['completed_cources'] as Map?)?.map( - (k, e) => MapEntry( - k, CompletedCoursesModel.fromJson(e as Map)), - ), + completedCourses: (json['completed_cources'] as List?) + ?.map( + (e) => CompletedCoursesModel.fromJson(e as Map)) + .toList(), vkLink: json['vk_link'] as String?, instaLink: json['insta_link'] as String?, fbLink: json['fb_link'] as String?, diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index 98ad0e81..25a16f98 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -487,7 +487,7 @@ class _ProfileScreenState extends State { child: Column( children: [ if (state.profile.educationResource?.completedCourses != null) - ...state.profile.educationResource!.completedCourses!.values.map((c) => _educationBlock(c.title, c.date)).toList(), + ...state.profile.educationResource!.completedCourses!.map((c) => _educationBlock(c.title, c.date)).toList(), ], ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 3274a97a..b9f4611f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,8 +16,8 @@ dependencies: flutter_secure_storage: ^9.2.2 flutter_bloc: ^8.1.6 cached_network_image: ^3.4.1 - flutter_svg: ^2.0.14 - equatable: ^2.0.5 + flutter_svg: ^2.0.16 + equatable: ^2.0.7 freezed_annotation: ^2.4.4 json_annotation: ^4.9.0 validators: ^3.0.0 @@ -26,7 +26,7 @@ dependencies: flutter_form_builder: ^9.5.0 image_picker: ^1.1.2 flutter_typeahead: ^5.2.0 - go_router: ^14.6.0 + go_router: ^14.6.2 keyboard_dismisser: ^3.0.0 retrofit: ^4.4.1 get_it: ^8.0.2 @@ -39,8 +39,8 @@ dependencies: badges: ^3.1.2 google_fonts: ^6.2.1 location: ^7.0.1 - syncfusion_flutter_charts: ^27.2.2 - syncfusion_flutter_gauges: ^27.2.2 + syncfusion_flutter_charts: ^27.2.5 + syncfusion_flutter_gauges: ^27.2.5 table_calendar: ^3.1.2 flutter_keyboard_visibility: ^6.0.0 share_plus: ^10.1.2 @@ -65,6 +65,7 @@ dev_dependencies: freezed: ^2.5.7 json_serializable: ^6.9.0 retrofit_generator: ^9.1.5 + mockito: ^5.4.4 flutter_test: sdk: flutter diff --git a/test/auth_test.dart b/test/auth_test.dart deleted file mode 100644 index 626a1ce1..00000000 --- a/test/auth_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:eatvio_app/features/auth/auth_screen/auth_screen.dart'; -import 'package:eatvio_app/features/auth/auth_screen/bloc/auth_bloc.dart'; -import 'package:eatvio_app/features/auth/auth_screen/models/auth_model.dart'; -import 'package:eatvio_app/generated/l10n.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; - - -void main() { - group('AuthScreen', () { - testWidgets('renders AuthScreen with initial state', (WidgetTester tester) async { - final authBloc = AuthBloc(AuthState(authModelObj: AuthModel())); - - await tester.pumpWidget( - MaterialApp( - localizationsDelegates: const [ - S.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: S.delegate.supportedLocales, - home: BlocProvider( - create: (context) => authBloc, - child: Builder( - builder: (context) { - return AuthScreen(); - }, - ), - ), - ), - ); - }); - }); -} diff --git a/test/features/profile/services/profile_service_test.dart b/test/features/profile/services/profile_service_test.dart new file mode 100644 index 00000000..4db6526b --- /dev/null +++ b/test/features/profile/services/profile_service_test.dart @@ -0,0 +1,92 @@ +import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart'; +import 'package:eatvio_app/features/profile/models/circumference_model.dart'; +import 'package:eatvio_app/features/profile/models/profile_model.dart'; +import 'package:eatvio_app/features/profile/models/weight_model.dart'; +import 'package:eatvio_app/features/profile/services/profile_service.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'profile_service_test.mocks.dart'; + +@GenerateNiceMocks([MockSpec()]) +void main() { + group('profileService', () { + final mockProfileService = MockProfileService(); + test('getMyProfile', () async { + when(mockProfileService.getMyProfile()).thenAnswer( + (_) async => await Future.value( + ProfileModel( + id: 0, + name: 'Alexander Avanesyan', + email: 'mso7nueh@mail.ru', + isPublicProfile: true, + isEntitySubscribedByMe: false, + slug: 'slug', + profilePhotoUrl: '', + role: 'user', + badges: [], + subscriptions: [], + subscribers: [], + ), + ), + ); + expect(await mockProfileService.getMyProfile(), isA()); + }); + + test('getProfileDetailsBySlug', () async { + when(mockProfileService.getProfileDetailsBySlug(slug: 'slug')).thenAnswer( + (_) async => await Future.value( + ProfileDetailsModel( + firstName: 'Alexnader', + lastName: 'Avanesyan', + birthdate: '2024-05-28', + gender: 'male', + country: 'Russia', + city: 'Moscow', + lang: 'Russian', + weight: 84, + height: 178, + chestCircumference: 100, + waistCircumference: 80, + hipCircumference: 90, + bloodPressureUp: 120, + bloodPressureDown: 80, + hasHypo: false, + hasHyper: false, + aboutAlergy: '', + aboutTakingPils: '', + aboutSportHobbies: 'Judo', + favoriteFoods: '', + unfavoriteFoods: '', + additionalInfo: '10 lvl faceit', + isMoodFillable: true, + isBedtimeFillable: true, + activityCoefficient: 2, + ), + ), + ); + expect(await mockProfileService.getProfileDetailsBySlug(slug: 'slug'), isA()); + }); + + test('getBlogPostByAuthorSlug', () async { + when(mockProfileService.getBlogPostByAuthorSlug(slug: '')).thenAnswer( + (_) async => [], + ); + expect(await mockProfileService.getBlogPostByAuthorSlug(slug: 'slug'), isA>()); + }); + + test('getWeight', () async { + when(mockProfileService.getWeight(period: '')).thenAnswer( + (_) async => [], + ); + expect(await mockProfileService.getWeight(period: ''), isA>()); + }); + + test('getCircumferences', () async { + when(mockProfileService.getCircumferences(period: '')).thenAnswer( + (_) async => [], + ); + expect(await mockProfileService.getCircumferences(period: ''), isA>()); + }); + }); +} diff --git a/test/features/profile/services/profile_service_test.mocks.dart b/test/features/profile/services/profile_service_test.mocks.dart new file mode 100644 index 00000000..bb0c633a --- /dev/null +++ b/test/features/profile/services/profile_service_test.mocks.dart @@ -0,0 +1,414 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in eatvio_app/test/features/profile/services/profile_service_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; +import 'dart:io' as _i9; + +import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart' + as _i6; +import 'package:eatvio_app/features/profile/models/circumference_model.dart' + as _i8; +import 'package:eatvio_app/features/profile/models/profile_model.dart' as _i2; +import 'package:eatvio_app/features/profile/models/sub_model.dart' as _i3; +import 'package:eatvio_app/features/profile/models/weight_model.dart' as _i7; +import 'package:eatvio_app/features/profile/services/profile_service.dart' + as _i4; +import 'package:mockito/mockito.dart' as _i1; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeProfileModel_0 extends _i1.SmartFake implements _i2.ProfileModel { + _FakeProfileModel_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeProfileDetailsModel_1 extends _i1.SmartFake + implements _i2.ProfileDetailsModel { + _FakeProfileDetailsModel_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSubPaginationModel_2 extends _i1.SmartFake + implements _i3.SubPaginationModel { + _FakeSubPaginationModel_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ProfileService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockProfileService extends _i1.Mock implements _i4.ProfileService { + @override + _i5.Future<_i2.ProfileModel> getProfileBySlug({required String? slug}) => + (super.noSuchMethod( + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + returnValue: _i5.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + )), + ) as _i5.Future<_i2.ProfileModel>); + + @override + _i5.Future<_i2.ProfileModel> getMyProfile() => (super.noSuchMethod( + Invocation.method( + #getMyProfile, + [], + ), + returnValue: _i5.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getMyProfile, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getMyProfile, + [], + ), + )), + ) as _i5.Future<_i2.ProfileModel>); + + @override + _i5.Future<_i2.ProfileDetailsModel> getMyProfileDetails() => + (super.noSuchMethod( + Invocation.method( + #getMyProfileDetails, + [], + ), + returnValue: _i5.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getMyProfileDetails, + [], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getMyProfileDetails, + [], + ), + )), + ) as _i5.Future<_i2.ProfileDetailsModel>); + + @override + _i5.Future<_i2.ProfileDetailsModel> getProfileDetailsBySlug( + {required String? slug}) => + (super.noSuchMethod( + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + returnValue: _i5.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + )), + ) as _i5.Future<_i2.ProfileDetailsModel>); + + @override + _i5.Future addCircumference({ + required int? chestCircumference, + required int? waistCircumference, + required int? hipCircumference, + }) => + (super.noSuchMethod( + Invocation.method( + #addCircumference, + [], + { + #chestCircumference: chestCircumference, + #waistCircumference: waistCircumference, + #hipCircumference: hipCircumference, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future addWeight({required double? weight}) => (super.noSuchMethod( + Invocation.method( + #addWeight, + [], + {#weight: weight}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future> getBlogPostByAuthorSlug( + {required String? slug}) => + (super.noSuchMethod( + Invocation.method( + #getBlogPostByAuthorSlug, + [], + {#slug: slug}, + ), + returnValue: _i5.Future>.value( + <_i6.FeedBlogPostModel>[]), + returnValueForMissingStub: + _i5.Future>.value( + <_i6.FeedBlogPostModel>[]), + ) as _i5.Future>); + + @override + _i5.Future> getWeight({required String? period}) => + (super.noSuchMethod( + Invocation.method( + #getWeight, + [], + {#period: period}, + ), + returnValue: + _i5.Future>.value(<_i7.WeightModel>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i7.WeightModel>[]), + ) as _i5.Future>); + + @override + _i5.Future> getWeightBySlug({ + required String? period, + required String? slug, + }) => + (super.noSuchMethod( + Invocation.method( + #getWeightBySlug, + [], + { + #period: period, + #slug: slug, + }, + ), + returnValue: + _i5.Future>.value(<_i7.WeightModel>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i7.WeightModel>[]), + ) as _i5.Future>); + + @override + _i5.Future> getCircumferences( + {required String? period}) => + (super.noSuchMethod( + Invocation.method( + #getCircumferences, + [], + {#period: period}, + ), + returnValue: _i5.Future>.value( + <_i8.CircumferenceModel>[]), + returnValueForMissingStub: + _i5.Future>.value( + <_i8.CircumferenceModel>[]), + ) as _i5.Future>); + + @override + _i5.Future> getCircumferencesBySlug({ + required String? period, + required String? slug, + }) => + (super.noSuchMethod( + Invocation.method( + #getCircumferencesBySlug, + [], + { + #period: period, + #slug: slug, + }, + ), + returnValue: _i5.Future>.value( + <_i8.CircumferenceModel>[]), + returnValueForMissingStub: + _i5.Future>.value( + <_i8.CircumferenceModel>[]), + ) as _i5.Future>); + + @override + _i5.Future<_i3.SubPaginationModel> getSubscribers({ + required String? slug, + String? query, + }) => + (super.noSuchMethod( + Invocation.method( + #getSubscribers, + [], + { + #slug: slug, + #query: query, + }, + ), + returnValue: + _i5.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscribers, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscribers, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + ) as _i5.Future<_i3.SubPaginationModel>); + + @override + _i5.Future<_i3.SubPaginationModel> getSubscriptions({ + required String? slug, + String? query, + }) => + (super.noSuchMethod( + Invocation.method( + #getSubscriptions, + [], + { + #slug: slug, + #query: query, + }, + ), + returnValue: + _i5.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscriptions, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscriptions, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + ) as _i5.Future<_i3.SubPaginationModel>); + + @override + _i5.Future subscribe({required String? slug}) => (super.noSuchMethod( + Invocation.method( + #subscribe, + [], + {#slug: slug}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future unsubscribe({required String? slug}) => (super.noSuchMethod( + Invocation.method( + #unsubscribe, + [], + {#slug: slug}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future uploadPhoto({required _i9.File? photo}) => + (super.noSuchMethod( + Invocation.method( + #uploadPhoto, + [], + {#photo: photo}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future deletePhoto() => (super.noSuchMethod( + Invocation.method( + #deletePhoto, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); +}