forked from eatvio/eatvio_app
Merge pull request 'main' (#194) from mso7nueh/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#194
This commit is contained in:
@@ -18,7 +18,7 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
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
|
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,13 +87,17 @@ class InitializationCubit extends Cubit<InitializationState> {
|
|||||||
await subscribeNotifications(wsUrl.userId, client);
|
await subscribeNotifications(wsUrl.userId, client);
|
||||||
await subscribeChatMessages(wsUrl.userId, client);
|
await subscribeChatMessages(wsUrl.userId, client);
|
||||||
|
|
||||||
emit(InitializationState.success(
|
emit(
|
||||||
client: client,
|
InitializationState.success(
|
||||||
),);
|
client: client,
|
||||||
|
),
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(InitializationState.error(
|
emit(
|
||||||
errorMessage: e.toString(),
|
InitializationState.error(
|
||||||
),);
|
errorMessage: e.toString(),
|
||||||
|
),
|
||||||
|
);
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class DiaryCubit extends Cubit<DiaryState> {
|
|||||||
await fetchDiary();
|
await fetchDiary();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<GlossaryModerationModel> sendProductToModeration({
|
Future<void> sendProductToModeration({
|
||||||
required String name,
|
required String name,
|
||||||
required double energy,
|
required double energy,
|
||||||
required double proteins,
|
required double proteins,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:eatvio_app/features/diary/presentation/bloc/diary_cubit.dart';
|
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/theme/theme_helper.dart';
|
||||||
import 'package:eatvio_app/core/widgets/custom_text_form_field.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:flutter/material.dart';
|
||||||
import 'package:lottie/lottie.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
|
|
||||||
@@ -28,7 +27,7 @@ class _GlossaryModerationRequestModalWidgetState extends State<GlossaryModeratio
|
|||||||
final proteinsController = TextEditingController();
|
final proteinsController = TextEditingController();
|
||||||
final fatsController = TextEditingController();
|
final fatsController = TextEditingController();
|
||||||
final carbohydratesController = TextEditingController();
|
final carbohydratesController = TextEditingController();
|
||||||
GlossaryModel? glossary;
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (glossaryState == GlossaryState.alert) {
|
if (glossaryState == GlossaryState.alert) {
|
||||||
@@ -161,7 +160,7 @@ class _GlossaryModerationRequestModalWidgetState extends State<GlossaryModeratio
|
|||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pop(glossary);
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
child: Ink(
|
child: Ink(
|
||||||
@@ -264,14 +263,13 @@ class _GlossaryModerationRequestModalWidgetState extends State<GlossaryModeratio
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
glossary = (await widget.diaryCubit.sendProductToModeration(
|
await widget.diaryCubit.sendProductToModeration(
|
||||||
name: productNameController.text,
|
name: productNameController.text,
|
||||||
energy: double.parse(energyController.text),
|
energy: double.parse(energyController.text),
|
||||||
proteins: double.parse(proteinsController.text),
|
proteins: double.parse(proteinsController.text),
|
||||||
fats: double.parse(fatsController.text),
|
fats: double.parse(fatsController.text),
|
||||||
carbohydrates: double.parse(carbohydratesController.text),
|
carbohydrates: double.parse(carbohydratesController.text),
|
||||||
))
|
);
|
||||||
.glossary;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
glossaryState = GlossaryState.success;
|
glossaryState = GlossaryState.success;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ 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/diary/models/nutrition_model.dart';
|
||||||
import 'package:eatvio_app/features/diary/models/product_moderation_model.dart';
|
import 'package:eatvio_app/features/diary/models/product_moderation_model.dart';
|
||||||
import 'package:eatvio_app/features/diary/services/diary_service.dart';
|
import 'package:eatvio_app/features/diary/services/diary_service.dart';
|
||||||
import 'package:eatvio_app/features/glossary/models/glossary_model.dart';
|
|
||||||
|
|
||||||
class DiaryRepository {
|
class DiaryRepository {
|
||||||
final DiaryService diaryService;
|
final DiaryService diaryService;
|
||||||
@@ -128,7 +127,7 @@ class DiaryRepository {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<GlossaryModerationModel> sendProductToModeration({
|
Future<void> sendProductToModeration({
|
||||||
required String name,
|
required String name,
|
||||||
required double energy,
|
required double energy,
|
||||||
required double proteins,
|
required double proteins,
|
||||||
|
|||||||
@@ -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/diary_day_model.dart';
|
||||||
import 'package:eatvio_app/features/diary/models/finish_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/diary/models/nutrition_model.dart';
|
||||||
import 'package:eatvio_app/features/glossary/models/glossary_model.dart';
|
|
||||||
import 'package:retrofit/retrofit.dart';
|
import 'package:retrofit/retrofit.dart';
|
||||||
|
|
||||||
part 'diary_service.g.dart';
|
part 'diary_service.g.dart';
|
||||||
@@ -88,7 +87,7 @@ abstract class DiaryService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
@POST('/api/diary/product_nutritional_values/sendToModeration')
|
@POST('/api/diary/product_nutritional_values/sendToModeration')
|
||||||
Future<GlossaryModerationModel> sendProductToModeration({
|
Future<void> sendProductToModeration({
|
||||||
@Body() required Map<String, dynamic> data,
|
@Body() required Map<String, dynamic> data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,14 +387,14 @@ class _DiaryService implements DiaryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<GlossaryModerationModel> sendProductToModeration(
|
Future<void> sendProductToModeration(
|
||||||
{required Map<String, dynamic> data}) async {
|
{required Map<String, dynamic> data}) async {
|
||||||
final _extra = <String, dynamic>{};
|
final _extra = <String, dynamic>{};
|
||||||
final queryParameters = <String, dynamic>{};
|
final queryParameters = <String, dynamic>{};
|
||||||
final _headers = <String, dynamic>{};
|
final _headers = <String, dynamic>{};
|
||||||
final _data = <String, dynamic>{};
|
final _data = <String, dynamic>{};
|
||||||
_data.addAll(data);
|
_data.addAll(data);
|
||||||
final _options = _setStreamType<GlossaryModerationModel>(Options(
|
final _options = _setStreamType<void>(Options(
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: _headers,
|
headers: _headers,
|
||||||
extra: _extra,
|
extra: _extra,
|
||||||
@@ -410,15 +410,7 @@ class _DiaryService implements DiaryService {
|
|||||||
_dio.options.baseUrl,
|
_dio.options.baseUrl,
|
||||||
baseUrl,
|
baseUrl,
|
||||||
)));
|
)));
|
||||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
await _dio.fetch<void>(_options);
|
||||||
late GlossaryModerationModel _value;
|
|
||||||
try {
|
|
||||||
_value = GlossaryModerationModel.fromJson(_result.data!);
|
|
||||||
} on Object catch (e, s) {
|
|
||||||
errorLogger?.logError(e, s, _options);
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
return _value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
|||||||
height: 1,
|
height: 1,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
@@ -83,6 +84,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: Colors.black45,
|
color: Colors.black45,
|
||||||
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -102,6 +104,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
state.feedBlogPostList[widget.index].title,
|
state.feedBlogPostList[widget.index].title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
@@ -117,6 +120,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
|||||||
: state.feedBlogPostList[widget.index].description,
|
: state.feedBlogPostList[widget.index].description,
|
||||||
style: {
|
style: {
|
||||||
"*": Style(
|
"*": Style(
|
||||||
|
fontSize: FontSize(16),
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class DiplomasAndCertificatesModel with _$DiplomasAndCertificatesModel {
|
|||||||
class EducationModel with _$EducationModel {
|
class EducationModel with _$EducationModel {
|
||||||
const factory EducationModel({
|
const factory EducationModel({
|
||||||
@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
||||||
@JsonKey(name: "completed_cources") Map<String, CompletedCoursesModel>? completedCourses,
|
@JsonKey(name: "completed_cources") List<CompletedCoursesModel>? completedCourses,
|
||||||
@JsonKey(name: "vk_link") String? vkLink,
|
@JsonKey(name: "vk_link") String? vkLink,
|
||||||
@JsonKey(name: "insta_link") String? instaLink,
|
@JsonKey(name: "insta_link") String? instaLink,
|
||||||
@JsonKey(name: "fb_link") String? fbLink,
|
@JsonKey(name: "fb_link") String? fbLink,
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ mixin _$EducationModel {
|
|||||||
@JsonKey(name: "has_medical_education")
|
@JsonKey(name: "has_medical_education")
|
||||||
int? get hasMedicalEducation => throw _privateConstructorUsedError;
|
int? get hasMedicalEducation => throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
Map<String, CompletedCoursesModel>? get completedCourses =>
|
List<CompletedCoursesModel>? get completedCourses =>
|
||||||
throw _privateConstructorUsedError;
|
throw _privateConstructorUsedError;
|
||||||
@JsonKey(name: "vk_link")
|
@JsonKey(name: "vk_link")
|
||||||
String? get vkLink => throw _privateConstructorUsedError;
|
String? get vkLink => throw _privateConstructorUsedError;
|
||||||
@@ -855,7 +855,7 @@ abstract class $EducationModelCopyWith<$Res> {
|
|||||||
$Res call(
|
$Res call(
|
||||||
{@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
{@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
Map<String, CompletedCoursesModel>? completedCourses,
|
List<CompletedCoursesModel>? completedCourses,
|
||||||
@JsonKey(name: "vk_link") String? vkLink,
|
@JsonKey(name: "vk_link") String? vkLink,
|
||||||
@JsonKey(name: "insta_link") String? instaLink,
|
@JsonKey(name: "insta_link") String? instaLink,
|
||||||
@JsonKey(name: "fb_link") String? fbLink,
|
@JsonKey(name: "fb_link") String? fbLink,
|
||||||
@@ -896,7 +896,7 @@ class _$EducationModelCopyWithImpl<$Res, $Val extends EducationModel>
|
|||||||
completedCourses: freezed == completedCourses
|
completedCourses: freezed == completedCourses
|
||||||
? _value.completedCourses
|
? _value.completedCourses
|
||||||
: completedCourses // ignore: cast_nullable_to_non_nullable
|
: completedCourses // ignore: cast_nullable_to_non_nullable
|
||||||
as Map<String, CompletedCoursesModel>?,
|
as List<CompletedCoursesModel>?,
|
||||||
vkLink: freezed == vkLink
|
vkLink: freezed == vkLink
|
||||||
? _value.vkLink
|
? _value.vkLink
|
||||||
: vkLink // ignore: cast_nullable_to_non_nullable
|
: vkLink // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -936,7 +936,7 @@ abstract class _$$EducationModelImplCopyWith<$Res>
|
|||||||
$Res call(
|
$Res call(
|
||||||
{@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
{@JsonKey(name: "has_medical_education") int? hasMedicalEducation,
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
Map<String, CompletedCoursesModel>? completedCourses,
|
List<CompletedCoursesModel>? completedCourses,
|
||||||
@JsonKey(name: "vk_link") String? vkLink,
|
@JsonKey(name: "vk_link") String? vkLink,
|
||||||
@JsonKey(name: "insta_link") String? instaLink,
|
@JsonKey(name: "insta_link") String? instaLink,
|
||||||
@JsonKey(name: "fb_link") String? fbLink,
|
@JsonKey(name: "fb_link") String? fbLink,
|
||||||
@@ -975,7 +975,7 @@ class __$$EducationModelImplCopyWithImpl<$Res>
|
|||||||
completedCourses: freezed == completedCourses
|
completedCourses: freezed == completedCourses
|
||||||
? _value._completedCourses
|
? _value._completedCourses
|
||||||
: completedCourses // ignore: cast_nullable_to_non_nullable
|
: completedCourses // ignore: cast_nullable_to_non_nullable
|
||||||
as Map<String, CompletedCoursesModel>?,
|
as List<CompletedCoursesModel>?,
|
||||||
vkLink: freezed == vkLink
|
vkLink: freezed == vkLink
|
||||||
? _value.vkLink
|
? _value.vkLink
|
||||||
: vkLink // ignore: cast_nullable_to_non_nullable
|
: vkLink // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1010,7 +1010,7 @@ class _$EducationModelImpl implements _EducationModel {
|
|||||||
const _$EducationModelImpl(
|
const _$EducationModelImpl(
|
||||||
{@JsonKey(name: "has_medical_education") this.hasMedicalEducation,
|
{@JsonKey(name: "has_medical_education") this.hasMedicalEducation,
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
final Map<String, CompletedCoursesModel>? completedCourses,
|
final List<CompletedCoursesModel>? completedCourses,
|
||||||
@JsonKey(name: "vk_link") this.vkLink,
|
@JsonKey(name: "vk_link") this.vkLink,
|
||||||
@JsonKey(name: "insta_link") this.instaLink,
|
@JsonKey(name: "insta_link") this.instaLink,
|
||||||
@JsonKey(name: "fb_link") this.fbLink,
|
@JsonKey(name: "fb_link") this.fbLink,
|
||||||
@@ -1025,15 +1025,16 @@ class _$EducationModelImpl implements _EducationModel {
|
|||||||
@override
|
@override
|
||||||
@JsonKey(name: "has_medical_education")
|
@JsonKey(name: "has_medical_education")
|
||||||
final int? hasMedicalEducation;
|
final int? hasMedicalEducation;
|
||||||
final Map<String, CompletedCoursesModel>? _completedCourses;
|
final List<CompletedCoursesModel>? _completedCourses;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
Map<String, CompletedCoursesModel>? get completedCourses {
|
List<CompletedCoursesModel>? get completedCourses {
|
||||||
final value = _completedCourses;
|
final value = _completedCourses;
|
||||||
if (value == null) return null;
|
if (value == null) return null;
|
||||||
if (_completedCourses is EqualUnmodifiableMapView) return _completedCourses;
|
if (_completedCourses is EqualUnmodifiableListView)
|
||||||
|
return _completedCourses;
|
||||||
// ignore: implicit_dynamic_type
|
// ignore: implicit_dynamic_type
|
||||||
return EqualUnmodifiableMapView(value);
|
return EqualUnmodifiableListView(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -1114,7 +1115,7 @@ abstract class _EducationModel implements EducationModel {
|
|||||||
const factory _EducationModel(
|
const factory _EducationModel(
|
||||||
{@JsonKey(name: "has_medical_education") final int? hasMedicalEducation,
|
{@JsonKey(name: "has_medical_education") final int? hasMedicalEducation,
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
final Map<String, CompletedCoursesModel>? completedCourses,
|
final List<CompletedCoursesModel>? completedCourses,
|
||||||
@JsonKey(name: "vk_link") final String? vkLink,
|
@JsonKey(name: "vk_link") final String? vkLink,
|
||||||
@JsonKey(name: "insta_link") final String? instaLink,
|
@JsonKey(name: "insta_link") final String? instaLink,
|
||||||
@JsonKey(name: "fb_link") final String? fbLink,
|
@JsonKey(name: "fb_link") final String? fbLink,
|
||||||
@@ -1131,7 +1132,7 @@ abstract class _EducationModel implements EducationModel {
|
|||||||
int? get hasMedicalEducation;
|
int? get hasMedicalEducation;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "completed_cources")
|
@JsonKey(name: "completed_cources")
|
||||||
Map<String, CompletedCoursesModel>? get completedCourses;
|
List<CompletedCoursesModel>? get completedCourses;
|
||||||
@override
|
@override
|
||||||
@JsonKey(name: "vk_link")
|
@JsonKey(name: "vk_link")
|
||||||
String? get vkLink;
|
String? get vkLink;
|
||||||
|
|||||||
@@ -83,11 +83,10 @@ Map<String, dynamic> _$$DiplomasAndCertificatesModelImplToJson(
|
|||||||
_$EducationModelImpl _$$EducationModelImplFromJson(Map<String, dynamic> json) =>
|
_$EducationModelImpl _$$EducationModelImplFromJson(Map<String, dynamic> json) =>
|
||||||
_$EducationModelImpl(
|
_$EducationModelImpl(
|
||||||
hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(),
|
hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(),
|
||||||
completedCourses:
|
completedCourses: (json['completed_cources'] as List<dynamic>?)
|
||||||
(json['completed_cources'] as Map<String, dynamic>?)?.map(
|
?.map(
|
||||||
(k, e) => MapEntry(
|
(e) => CompletedCoursesModel.fromJson(e as Map<String, dynamic>))
|
||||||
k, CompletedCoursesModel.fromJson(e as Map<String, dynamic>)),
|
.toList(),
|
||||||
),
|
|
||||||
vkLink: json['vk_link'] as String?,
|
vkLink: json['vk_link'] as String?,
|
||||||
instaLink: json['insta_link'] as String?,
|
instaLink: json['insta_link'] as String?,
|
||||||
fbLink: json['fb_link'] as String?,
|
fbLink: json['fb_link'] as String?,
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if (state.profile.educationResource?.completedCourses != null)
|
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(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
11
pubspec.yaml
11
pubspec.yaml
@@ -16,8 +16,8 @@ dependencies:
|
|||||||
flutter_secure_storage: ^9.2.2
|
flutter_secure_storage: ^9.2.2
|
||||||
flutter_bloc: ^8.1.6
|
flutter_bloc: ^8.1.6
|
||||||
cached_network_image: ^3.4.1
|
cached_network_image: ^3.4.1
|
||||||
flutter_svg: ^2.0.14
|
flutter_svg: ^2.0.16
|
||||||
equatable: ^2.0.5
|
equatable: ^2.0.7
|
||||||
freezed_annotation: ^2.4.4
|
freezed_annotation: ^2.4.4
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
validators: ^3.0.0
|
validators: ^3.0.0
|
||||||
@@ -26,7 +26,7 @@ dependencies:
|
|||||||
flutter_form_builder: ^9.5.0
|
flutter_form_builder: ^9.5.0
|
||||||
image_picker: ^1.1.2
|
image_picker: ^1.1.2
|
||||||
flutter_typeahead: ^5.2.0
|
flutter_typeahead: ^5.2.0
|
||||||
go_router: ^14.6.0
|
go_router: ^14.6.2
|
||||||
keyboard_dismisser: ^3.0.0
|
keyboard_dismisser: ^3.0.0
|
||||||
retrofit: ^4.4.1
|
retrofit: ^4.4.1
|
||||||
get_it: ^8.0.2
|
get_it: ^8.0.2
|
||||||
@@ -39,8 +39,8 @@ dependencies:
|
|||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
google_fonts: ^6.2.1
|
google_fonts: ^6.2.1
|
||||||
location: ^7.0.1
|
location: ^7.0.1
|
||||||
syncfusion_flutter_charts: ^27.2.2
|
syncfusion_flutter_charts: ^27.2.5
|
||||||
syncfusion_flutter_gauges: ^27.2.2
|
syncfusion_flutter_gauges: ^27.2.5
|
||||||
table_calendar: ^3.1.2
|
table_calendar: ^3.1.2
|
||||||
flutter_keyboard_visibility: ^6.0.0
|
flutter_keyboard_visibility: ^6.0.0
|
||||||
share_plus: ^10.1.2
|
share_plus: ^10.1.2
|
||||||
@@ -65,6 +65,7 @@ dev_dependencies:
|
|||||||
freezed: ^2.5.7
|
freezed: ^2.5.7
|
||||||
json_serializable: ^6.9.0
|
json_serializable: ^6.9.0
|
||||||
retrofit_generator: ^9.1.5
|
retrofit_generator: ^9.1.5
|
||||||
|
mockito: ^5.4.4
|
||||||
|
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
@@ -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<AuthBloc>(
|
|
||||||
create: (context) => authBloc,
|
|
||||||
child: Builder(
|
|
||||||
builder: (context) {
|
|
||||||
return AuthScreen();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
92
test/features/profile/services/profile_service_test.dart
Normal file
92
test/features/profile/services/profile_service_test.dart
Normal file
@@ -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<ProfileService>()])
|
||||||
|
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<ProfileModel>());
|
||||||
|
});
|
||||||
|
|
||||||
|
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<ProfileDetailsModel>());
|
||||||
|
});
|
||||||
|
|
||||||
|
test('getBlogPostByAuthorSlug', () async {
|
||||||
|
when(mockProfileService.getBlogPostByAuthorSlug(slug: '')).thenAnswer(
|
||||||
|
(_) async => [],
|
||||||
|
);
|
||||||
|
expect(await mockProfileService.getBlogPostByAuthorSlug(slug: 'slug'), isA<List<FeedBlogPostModel>>());
|
||||||
|
});
|
||||||
|
|
||||||
|
test('getWeight', () async {
|
||||||
|
when(mockProfileService.getWeight(period: '')).thenAnswer(
|
||||||
|
(_) async => [],
|
||||||
|
);
|
||||||
|
expect(await mockProfileService.getWeight(period: ''), isA<List<WeightModel>>());
|
||||||
|
});
|
||||||
|
|
||||||
|
test('getCircumferences', () async {
|
||||||
|
when(mockProfileService.getCircumferences(period: '')).thenAnswer(
|
||||||
|
(_) async => [],
|
||||||
|
);
|
||||||
|
expect(await mockProfileService.getCircumferences(period: ''), isA<List<CircumferenceModel>>());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
414
test/features/profile/services/profile_service_test.mocks.dart
Normal file
414
test/features/profile/services/profile_service_test.mocks.dart
Normal file
@@ -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<void> addCircumference({
|
||||||
|
required int? chestCircumference,
|
||||||
|
required int? waistCircumference,
|
||||||
|
required int? hipCircumference,
|
||||||
|
}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#addCircumference,
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
#chestCircumference: chestCircumference,
|
||||||
|
#waistCircumference: waistCircumference,
|
||||||
|
#hipCircumference: hipCircumference,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> addWeight({required double? weight}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#addWeight,
|
||||||
|
[],
|
||||||
|
{#weight: weight},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<List<_i6.FeedBlogPostModel>> getBlogPostByAuthorSlug(
|
||||||
|
{required String? slug}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getBlogPostByAuthorSlug,
|
||||||
|
[],
|
||||||
|
{#slug: slug},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<List<_i6.FeedBlogPostModel>>.value(
|
||||||
|
<_i6.FeedBlogPostModel>[]),
|
||||||
|
returnValueForMissingStub:
|
||||||
|
_i5.Future<List<_i6.FeedBlogPostModel>>.value(
|
||||||
|
<_i6.FeedBlogPostModel>[]),
|
||||||
|
) as _i5.Future<List<_i6.FeedBlogPostModel>>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<List<_i7.WeightModel>> getWeight({required String? period}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getWeight,
|
||||||
|
[],
|
||||||
|
{#period: period},
|
||||||
|
),
|
||||||
|
returnValue:
|
||||||
|
_i5.Future<List<_i7.WeightModel>>.value(<_i7.WeightModel>[]),
|
||||||
|
returnValueForMissingStub:
|
||||||
|
_i5.Future<List<_i7.WeightModel>>.value(<_i7.WeightModel>[]),
|
||||||
|
) as _i5.Future<List<_i7.WeightModel>>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<List<_i7.WeightModel>> getWeightBySlug({
|
||||||
|
required String? period,
|
||||||
|
required String? slug,
|
||||||
|
}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getWeightBySlug,
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
#period: period,
|
||||||
|
#slug: slug,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
returnValue:
|
||||||
|
_i5.Future<List<_i7.WeightModel>>.value(<_i7.WeightModel>[]),
|
||||||
|
returnValueForMissingStub:
|
||||||
|
_i5.Future<List<_i7.WeightModel>>.value(<_i7.WeightModel>[]),
|
||||||
|
) as _i5.Future<List<_i7.WeightModel>>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<List<_i8.CircumferenceModel>> getCircumferences(
|
||||||
|
{required String? period}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getCircumferences,
|
||||||
|
[],
|
||||||
|
{#period: period},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<List<_i8.CircumferenceModel>>.value(
|
||||||
|
<_i8.CircumferenceModel>[]),
|
||||||
|
returnValueForMissingStub:
|
||||||
|
_i5.Future<List<_i8.CircumferenceModel>>.value(
|
||||||
|
<_i8.CircumferenceModel>[]),
|
||||||
|
) as _i5.Future<List<_i8.CircumferenceModel>>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<List<_i8.CircumferenceModel>> getCircumferencesBySlug({
|
||||||
|
required String? period,
|
||||||
|
required String? slug,
|
||||||
|
}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getCircumferencesBySlug,
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
#period: period,
|
||||||
|
#slug: slug,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<List<_i8.CircumferenceModel>>.value(
|
||||||
|
<_i8.CircumferenceModel>[]),
|
||||||
|
returnValueForMissingStub:
|
||||||
|
_i5.Future<List<_i8.CircumferenceModel>>.value(
|
||||||
|
<_i8.CircumferenceModel>[]),
|
||||||
|
) as _i5.Future<List<_i8.CircumferenceModel>>);
|
||||||
|
|
||||||
|
@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<void> subscribe({required String? slug}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#subscribe,
|
||||||
|
[],
|
||||||
|
{#slug: slug},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> unsubscribe({required String? slug}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#unsubscribe,
|
||||||
|
[],
|
||||||
|
{#slug: slug},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> uploadPhoto({required _i9.File? photo}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#uploadPhoto,
|
||||||
|
[],
|
||||||
|
{#photo: photo},
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i5.Future<void> deletePhoto() => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#deletePhoto,
|
||||||
|
[],
|
||||||
|
),
|
||||||
|
returnValue: _i5.Future<void>.value(),
|
||||||
|
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||||
|
) as _i5.Future<void>);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user