diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 2e33a319..bd6cf419 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -30,10 +30,10 @@ jobs: java-version: ${{ env.java_version }} cache: gradle - - name: Install utils for Android SDK + - name: Install utils for Android SDK run: | apt-get update - apt-get install -y openjdk-11-jdk wget jq clang cmake ninja-build libgtk-3-dev + apt-get install -y openjdk-11-jdk wget jq clang cmake ninja-build libgtk-3-dev - name: Install Android SDK if: steps.cache-sdk.outputs.cache-hit != 'true' @@ -50,14 +50,14 @@ jobs: sdkmanager "platform-tools" "platforms;android-35" "platforms;android-34" "platforms;android-33" "platforms;android-31" sdkmanager "build-tools;34.0.0" sdkmanager "ndk;25.1.8937393" - sdkmanager --install "cmake;3.22.1" + sdkmanager --install "cmake;3.22.1" - name: Set up Android environment variables id: "android-env-setup" run: | echo "ANDROID_SDK_ROOT=${{ env.my_local_cache_dir }}Android/Sdk" >> $GITHUB_ENV echo "PATH=$PATH:${{ env.my_local_cache_dir }}Android/Sdk/cmdline-tools/latest/bin:${{ env.my_local_cache_dir }}Android/Sdk/platform-tools:${{ env.my_local_cache_dir }}Android/Sdk/build-tools/30.0.3:${{ env.my_local_cache_dir }}Android/Sdk/build-tools/34.0.0" >> $GITHUB_ENV - echo "ANDROID_HOME=${{ env.my_local_cache_dir }}Android/Sdk" >> $GITHUB_ENV + echo "ANDROID_HOME=${{ env.my_local_cache_dir }}Android/Sdk" >> $GITHUB_ENV - id: flutter-action uses: actions/flutter-action@v2 @@ -88,7 +88,7 @@ jobs: run: | git config --global --add safe.directory /opt/hostedtoolcache/flutter/${{ env.flutter_channel }}-${{ env.flutter_version }}-${{ steps.flutter-action.outputs.ARCHITECTURE }} flutter config --android-sdk="$ANDROID_HOME" - flutter doctor -v + flutter doctor -v - name: Get dependencies run: flutter pub get @@ -97,7 +97,7 @@ jobs: run: flutter analyze - name: Test - run: flutter test + run: flutter test - name: Build apk run: flutter build apk --release @@ -108,7 +108,7 @@ jobs: APK_NAME="eatvio_app_${TIMESTAMP}.apk" mv build/app/outputs/flutter-apk/app-release.apk $APK_NAME echo "APK build finished $APK_NAME" - echo "APK_NAME=$APK_NAME" >> $GITHUB_ENV + echo "APK_NAME=$APK_NAME" >> $GITHUB_ENV - name: Upload APK artifact uses: actions/upload-artifact@v3 diff --git a/android/app/build.gradle b/android/app/build.gradle index 3d80d62a..61c969aa 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,8 +6,8 @@ plugins { android { namespace = "com.eatvioapp.app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion + compileSdk = 35 + ndkVersion = "28.0.12433566" compileOptions { sourceCompatibility = JavaVersion.VERSION_21 @@ -15,13 +15,13 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_21 + jvmTarget = 21 } defaultConfig { applicationId = "com.eatvioapp.app" minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion + targetSdk = 35 versionCode = flutter.versionCode versionName = flutter.versionName } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 2496707b..28fdf3ac 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionBase=GRADLE_USER_HOME + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_cubit.dart b/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_cubit.dart index e66401f2..81784e5f 100644 --- a/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_cubit.dart +++ b/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_cubit.dart @@ -12,14 +12,14 @@ class BlogPostCreateCubit extends Cubit { createBlogPost({ String? title, - String? youtubeURL, + String? videoUrl, String? description, XFile? image, }) async { emit(BlogPostCreateState.loading()); await blogPostRepository.createBlogPost( title, - youtubeURL, + videoUrl, description, image, ); diff --git a/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart b/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart index d935cd62..ab3111c3 100644 --- a/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart +++ b/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart @@ -9,7 +9,7 @@ class BlogPostCreateCredentialsModel with _$BlogPostCreateCredentialsModel { const factory BlogPostCreateCredentialsModel({ required String title, required String description, - @JsonKey(name: 'youtube_url') required String youtubeUrl, + @JsonKey(name: 'video_url') required String videoUrl, @Default('active') String status, }) = _BlogPostCreateCredentialsModel; diff --git a/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart b/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart index 2dce271e..e8bde070 100644 --- a/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart +++ b/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart @@ -29,7 +29,7 @@ class _BlogPostCreateScreenState extends State { XFile? image; final titleController = TextEditingController(); final descriptionController = TextEditingController(); - final youtubeUrlController = TextEditingController(); + final videoUrlController = TextEditingController(); bool isLoading = false; @override @@ -141,7 +141,7 @@ class _BlogPostCreateScreenState extends State { blogPostCubit.createBlogPost( title: titleController.text, description: descriptionController.text, - youtubeURL: youtubeUrlController.text, + videoUrl: videoUrlController.text, image: image, ); }, @@ -167,15 +167,15 @@ class _BlogPostCreateScreenState extends State { minLines: 4, ), SizedBox(height: 16), - if (youtubeUrlController.text.isEmpty) Text('Изображение поста'), - if (youtubeUrlController.text.isEmpty) SizedBox(height: 8), - if (youtubeUrlController.text.isEmpty) _buildAddPhoto(), + if (videoUrlController.text.isEmpty) Text('Изображение поста'), + if (videoUrlController.text.isEmpty) SizedBox(height: 8), + if (videoUrlController.text.isEmpty) _buildAddPhoto(), SizedBox(height: 16), if (image == null) Text('Ссылка на видео'), if (image == null) SizedBox(height: 8), if (image == null) CustomTextFormField( - controller: youtubeUrlController, + controller: videoUrlController, ), SizedBox(height: 80), ], diff --git a/lib/features/blog_post_create/repositories/blog_post_repository.dart b/lib/features/blog_post_create/repositories/blog_post_repository.dart index 3c0e9c37..1f6331a0 100644 --- a/lib/features/blog_post_create/repositories/blog_post_repository.dart +++ b/lib/features/blog_post_create/repositories/blog_post_repository.dart @@ -13,7 +13,7 @@ class BlogPostRepository { Future createBlogPost( String? title, - String? youtubeURL, + String? videoUrl, String? description, XFile? image, ) async { @@ -21,7 +21,7 @@ class BlogPostRepository { 'title': title, 'description': description, 'state': 'active', - 'youtube_url': youtubeURL, + 'video_url': videoUrl, 'image': image != null ? await MultipartFile.fromFile((await ImageCompressUtility.compressFile(File(image.path))).path, filename: image.name) : null, }); diff --git a/lib/features/diary/services/diary_service.dart b/lib/features/diary/services/diary_service.dart index f78c646f..40598e04 100644 --- a/lib/features/diary/services/diary_service.dart +++ b/lib/features/diary/services/diary_service.dart @@ -12,7 +12,7 @@ abstract class DiaryService { @GET('/api/diary/index/{date}') Future> getDiaryIndexByDate({ - @Path('date') required String date, // yyyy-mm-dd + @Path('date') required String date, }); @GET('/api/diary/{diary_id}/show') @@ -68,7 +68,6 @@ abstract class DiaryService { @POST('/api/diary/{diary_id}/finishDay') Future finishDiaryDay({ @Path('diary_id') required int diaryId, - // @Body() required FinishDiaryDayModel finishDiaryDayModel, }); @POST('/api/diary/{diary_id}/meal/{meal}/satiety/fill') diff --git a/lib/features/feed/models/feed_blog_post_model.dart b/lib/features/feed/models/feed_blog_post_model.dart index f904032d..f56c2998 100644 --- a/lib/features/feed/models/feed_blog_post_model.dart +++ b/lib/features/feed/models/feed_blog_post_model.dart @@ -12,7 +12,7 @@ class FeedBlogPostModel with _$FeedBlogPostModel { required String image, required String description, required Author author, - @JsonKey(name: "youtube_url") required String youtubeUrl, + @JsonKey(name: "video_url") required String videoUrl, @JsonKey(name: "created_at") required DateTime createdAt, @JsonKey(name: "updated_at") required DateTime updatedAt, required String title, diff --git a/lib/features/feed/models/feed_blog_post_model.freezed.dart b/lib/features/feed/models/feed_blog_post_model.freezed.dart index 89087373..7814df66 100644 --- a/lib/features/feed/models/feed_blog_post_model.freezed.dart +++ b/lib/features/feed/models/feed_blog_post_model.freezed.dart @@ -25,8 +25,8 @@ mixin _$FeedBlogPostModel { String get image => throw _privateConstructorUsedError; String get description => throw _privateConstructorUsedError; Author get author => throw _privateConstructorUsedError; - @JsonKey(name: "youtube_url") - String get youtubeUrl => throw _privateConstructorUsedError; + @JsonKey(name: "video_url") + String get videoUrl => throw _privateConstructorUsedError; @JsonKey(name: "created_at") DateTime get createdAt => throw _privateConstructorUsedError; @JsonKey(name: "updated_at") @@ -63,7 +63,7 @@ abstract class $FeedBlogPostModelCopyWith<$Res> { String image, String description, Author author, - @JsonKey(name: "youtube_url") String youtubeUrl, + @JsonKey(name: "video_url") String videoUrl, @JsonKey(name: "created_at") DateTime createdAt, @JsonKey(name: "updated_at") DateTime updatedAt, String title, @@ -95,7 +95,7 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> Object? image = null, Object? description = null, Object? author = null, - Object? youtubeUrl = null, + Object? videoUrl = null, Object? createdAt = null, Object? updatedAt = null, Object? title = null, @@ -125,9 +125,9 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> ? _value.author : author // ignore: cast_nullable_to_non_nullable as Author, - youtubeUrl: null == youtubeUrl - ? _value.youtubeUrl - : youtubeUrl // ignore: cast_nullable_to_non_nullable + videoUrl: null == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt ? _value.createdAt @@ -185,7 +185,7 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res> String image, String description, Author author, - @JsonKey(name: "youtube_url") String youtubeUrl, + @JsonKey(name: "video_url") String videoUrl, @JsonKey(name: "created_at") DateTime createdAt, @JsonKey(name: "updated_at") DateTime updatedAt, String title, @@ -216,7 +216,7 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res> Object? image = null, Object? description = null, Object? author = null, - Object? youtubeUrl = null, + Object? videoUrl = null, Object? createdAt = null, Object? updatedAt = null, Object? title = null, @@ -246,9 +246,9 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res> ? _value.author : author // ignore: cast_nullable_to_non_nullable as Author, - youtubeUrl: null == youtubeUrl - ? _value.youtubeUrl - : youtubeUrl // ignore: cast_nullable_to_non_nullable + videoUrl: null == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt ? _value.createdAt @@ -291,7 +291,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { required this.image, required this.description, required this.author, - @JsonKey(name: "youtube_url") required this.youtubeUrl, + @JsonKey(name: "video_url") required this.videoUrl, @JsonKey(name: "created_at") required this.createdAt, @JsonKey(name: "updated_at") required this.updatedAt, required this.title, @@ -314,8 +314,8 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { @override final Author author; @override - @JsonKey(name: "youtube_url") - final String youtubeUrl; + @JsonKey(name: "video_url") + final String videoUrl; @override @JsonKey(name: "created_at") final DateTime createdAt; @@ -339,7 +339,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { @override String toString() { - return 'FeedBlogPostModel(id: $id, state: $state, image: $image, description: $description, author: $author, youtubeUrl: $youtubeUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, wasLikedByMe: $wasLikedByMe)'; + return 'FeedBlogPostModel(id: $id, state: $state, image: $image, description: $description, author: $author, videoUrl: $videoUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, wasLikedByMe: $wasLikedByMe)'; } @override @@ -353,8 +353,8 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { (identical(other.description, description) || other.description == description) && (identical(other.author, author) || other.author == author) && - (identical(other.youtubeUrl, youtubeUrl) || - other.youtubeUrl == youtubeUrl) && + (identical(other.videoUrl, videoUrl) || + other.videoUrl == videoUrl) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && (identical(other.updatedAt, updatedAt) || @@ -379,7 +379,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { image, description, author, - youtubeUrl, + videoUrl, createdAt, updatedAt, title, @@ -412,7 +412,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel { required final String image, required final String description, required final Author author, - @JsonKey(name: "youtube_url") required final String youtubeUrl, + @JsonKey(name: "video_url") required final String videoUrl, @JsonKey(name: "created_at") required final DateTime createdAt, @JsonKey(name: "updated_at") required final DateTime updatedAt, required final String title, @@ -436,8 +436,8 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel { @override Author get author; @override - @JsonKey(name: "youtube_url") - String get youtubeUrl; + @JsonKey(name: "video_url") + String get videoUrl; @override @JsonKey(name: "created_at") DateTime get createdAt; diff --git a/lib/features/feed/models/feed_blog_post_model.g.dart b/lib/features/feed/models/feed_blog_post_model.g.dart index fadf4302..50511fed 100644 --- a/lib/features/feed/models/feed_blog_post_model.g.dart +++ b/lib/features/feed/models/feed_blog_post_model.g.dart @@ -14,7 +14,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson( image: json['image'] as String, description: json['description'] as String, author: Author.fromJson(json['author'] as Map), - youtubeUrl: json['youtube_url'] as String, + videoUrl: json['video_url'] as String, createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), title: json['title'] as String, @@ -32,7 +32,7 @@ Map _$$FeedBlogPostModelImplToJson( 'image': instance.image, 'description': instance.description, 'author': instance.author, - 'youtube_url': instance.youtubeUrl, + 'video_url': instance.videoUrl, 'created_at': instance.createdAt.toIso8601String(), 'updated_at': instance.updatedAt.toIso8601String(), 'title': instance.title, diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index f8c2a192..51825cfd 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -826,8 +826,8 @@ class _ProfileScreenState extends State { return ImtChartWidget( weightPoints: weightPoints, ); + default: return SizedBox.shrink(); } - return SizedBox.shrink(); }, ), SizedBox(height: 8), diff --git a/lib/features/profile/presentation/widgets/imt_chart_widget.dart b/lib/features/profile/presentation/widgets/imt_chart_widget.dart index 4738581d..d7264772 100644 --- a/lib/features/profile/presentation/widgets/imt_chart_widget.dart +++ b/lib/features/profile/presentation/widgets/imt_chart_widget.dart @@ -21,6 +21,7 @@ class ImtChartWidget extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Row( children: [ + if (weightPoints.length > 0) Text( '${weightPoints.last.bmi.toStringAsFixed(2)}', style: TextStyle( @@ -29,17 +30,18 @@ class ImtChartWidget extends StatelessWidget { fontWeight: FontWeight.w500, ), ), - weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi - ? Icon( - Icons.arrow_drop_up, - size: 40, - color: Colors.grey, - ) - : Icon( - Icons.arrow_drop_down, - size: 40, - color: Colors.grey, - ), + if (weightPoints.length > 1) + weightPoints.last.bmi > weightPoints[weightPoints.length - 2].bmi + ? Icon( + Icons.arrow_drop_up, + size: 40, + color: Colors.grey, + ) + : Icon( + Icons.arrow_drop_down, + size: 40, + color: Colors.grey, + ), ], ), ), @@ -55,8 +57,6 @@ class ImtChartWidget extends StatelessWidget { lineType: TrackballLineType.vertical, ), primaryXAxis: DateTimeCategoryAxis( - initialVisibleMinimum: weightPoints.first.createdAt, - initialVisibleMaximum: weightPoints.last.createdAt, tickPosition: TickPosition.inside, majorTickLines: MajorTickLines( size: 0, diff --git a/lib/features/recipes/presentation/bloc/recipe_create_cubit.dart b/lib/features/recipes/presentation/bloc/recipe_create_cubit.dart index ecc3882a..e0cd0dce 100644 --- a/lib/features/recipes/presentation/bloc/recipe_create_cubit.dart +++ b/lib/features/recipes/presentation/bloc/recipe_create_cubit.dart @@ -76,7 +76,7 @@ class RecipeCreateCubit extends Cubit { productNameController: TextEditingController(), ingredientController: TextEditingController(), stepDescriptionController: TextEditingController(text: recipe.description), - youtubeLinkController: TextEditingController(text: recipe.video_url), + videoLinkController: TextEditingController(text: recipe.video_url), stepControllers: stepControllers ?? [], stepImages: stepImages ?? [], autocompleteList: [], @@ -124,7 +124,7 @@ class RecipeCreateCubit extends Cubit { productNameController: TextEditingController(), ingredientController: TextEditingController(), stepDescriptionController: TextEditingController(), - youtubeLinkController: TextEditingController(), + videoLinkController: TextEditingController(), stepControllers: [TextEditingController()], stepImages: [null], autocompleteList: [], diff --git a/lib/features/recipes/presentation/bloc/recipe_create_state.dart b/lib/features/recipes/presentation/bloc/recipe_create_state.dart index d80630da..8e84b19b 100644 --- a/lib/features/recipes/presentation/bloc/recipe_create_state.dart +++ b/lib/features/recipes/presentation/bloc/recipe_create_state.dart @@ -20,7 +20,7 @@ abstract class RecipeCreateState with _$RecipeCreateState { required TextEditingController productNameController, required TextEditingController ingredientController, required TextEditingController stepDescriptionController, - required TextEditingController youtubeLinkController, + required TextEditingController videoLinkController, required List stepControllers, XFile? recipeImage, required List stepImages, diff --git a/lib/features/recipes/presentation/bloc/recipe_create_state.freezed.dart b/lib/features/recipes/presentation/bloc/recipe_create_state.freezed.dart index e15a1a52..672872e2 100644 --- a/lib/features/recipes/presentation/bloc/recipe_create_state.freezed.dart +++ b/lib/features/recipes/presentation/bloc/recipe_create_state.freezed.dart @@ -27,7 +27,7 @@ mixin _$RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -56,7 +56,7 @@ mixin _$RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -85,7 +85,7 @@ mixin _$RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -202,7 +202,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -234,7 +234,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -266,7 +266,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -386,7 +386,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -418,7 +418,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -450,7 +450,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -530,7 +530,7 @@ abstract class _$$RecipeCreateStateLoadedImplCopyWith<$Res> { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -571,7 +571,7 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res> Object? productNameController = null, Object? ingredientController = null, Object? stepDescriptionController = null, - Object? youtubeLinkController = null, + Object? videoLinkController = null, Object? stepControllers = null, Object? recipeImage = freezed, Object? stepImages = null, @@ -611,9 +611,9 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res> ? _value.stepDescriptionController : stepDescriptionController // ignore: cast_nullable_to_non_nullable as TextEditingController, - youtubeLinkController: null == youtubeLinkController - ? _value.youtubeLinkController - : youtubeLinkController // ignore: cast_nullable_to_non_nullable + videoLinkController: null == videoLinkController + ? _value.videoLinkController + : videoLinkController // ignore: cast_nullable_to_non_nullable as TextEditingController, stepControllers: null == stepControllers ? _value._stepControllers @@ -726,7 +726,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { required this.productNameController, required this.ingredientController, required this.stepDescriptionController, - required this.youtubeLinkController, + required this.videoLinkController, required final List stepControllers, this.recipeImage, required final List stepImages, @@ -761,7 +761,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { @override final TextEditingController stepDescriptionController; @override - final TextEditingController youtubeLinkController; + final TextEditingController videoLinkController; final List _stepControllers; @override List get stepControllers { @@ -834,7 +834,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { @override String toString() { - return 'RecipeCreateState.loaded(recipe: $recipe, picker: $picker, titleController: $titleController, productNameController: $productNameController, ingredientController: $ingredientController, stepDescriptionController: $stepDescriptionController, youtubeLinkController: $youtubeLinkController, stepControllers: $stepControllers, recipeImage: $recipeImage, stepImages: $stepImages, ingredients: $ingredients, autocompleteList: $autocompleteList, numberOfSteps: $numberOfSteps, ingredientAsItems: $ingredientAsItems, types: $types, cookingTimes: $cookingTimes, statuses: $statuses, selectedType: $selectedType, selectedCookingTime: $selectedCookingTime, selectedStatus: $selectedStatus)'; + return 'RecipeCreateState.loaded(recipe: $recipe, picker: $picker, titleController: $titleController, productNameController: $productNameController, ingredientController: $ingredientController, stepDescriptionController: $stepDescriptionController, videoLinkController: $videoLinkController, stepControllers: $stepControllers, recipeImage: $recipeImage, stepImages: $stepImages, ingredients: $ingredients, autocompleteList: $autocompleteList, numberOfSteps: $numberOfSteps, ingredientAsItems: $ingredientAsItems, types: $types, cookingTimes: $cookingTimes, statuses: $statuses, selectedType: $selectedType, selectedCookingTime: $selectedCookingTime, selectedStatus: $selectedStatus)'; } @override @@ -853,8 +853,8 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { (identical(other.stepDescriptionController, stepDescriptionController) || other.stepDescriptionController == stepDescriptionController) && - (identical(other.youtubeLinkController, youtubeLinkController) || - other.youtubeLinkController == youtubeLinkController) && + (identical(other.videoLinkController, videoLinkController) || + other.videoLinkController == videoLinkController) && const DeepCollectionEquality() .equals(other._stepControllers, _stepControllers) && (identical(other.recipeImage, recipeImage) || @@ -890,7 +890,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { productNameController, ingredientController, stepDescriptionController, - youtubeLinkController, + videoLinkController, const DeepCollectionEquality().hash(_stepControllers), recipeImage, const DeepCollectionEquality().hash(_stepImages), @@ -927,7 +927,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -951,7 +951,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { productNameController, ingredientController, stepDescriptionController, - youtubeLinkController, + videoLinkController, stepControllers, recipeImage, stepImages, @@ -979,7 +979,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -1003,7 +1003,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { productNameController, ingredientController, stepDescriptionController, - youtubeLinkController, + videoLinkController, stepControllers, recipeImage, stepImages, @@ -1031,7 +1031,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -1057,7 +1057,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded { productNameController, ingredientController, stepDescriptionController, - youtubeLinkController, + videoLinkController, stepControllers, recipeImage, stepImages, @@ -1121,7 +1121,7 @@ abstract class RecipeCreateStateLoaded implements RecipeCreateState { required final TextEditingController productNameController, required final TextEditingController ingredientController, required final TextEditingController stepDescriptionController, - required final TextEditingController youtubeLinkController, + required final TextEditingController videoLinkController, required final List stepControllers, final XFile? recipeImage, required final List stepImages, @@ -1143,7 +1143,7 @@ abstract class RecipeCreateStateLoaded implements RecipeCreateState { TextEditingController get productNameController; TextEditingController get ingredientController; TextEditingController get stepDescriptionController; - TextEditingController get youtubeLinkController; + TextEditingController get videoLinkController; List get stepControllers; XFile? get recipeImage; List get stepImages; @@ -1246,7 +1246,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -1278,7 +1278,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, @@ -1310,7 +1310,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError { TextEditingController productNameController, TextEditingController ingredientController, TextEditingController stepDescriptionController, - TextEditingController youtubeLinkController, + TextEditingController videoLinkController, List stepControllers, XFile? recipeImage, List stepImages, diff --git a/lib/features/recipes/presentation/pages/recipe_create_screen.dart b/lib/features/recipes/presentation/pages/recipe_create_screen.dart index 08a0dd94..bc95e6c3 100644 --- a/lib/features/recipes/presentation/pages/recipe_create_screen.dart +++ b/lib/features/recipes/presentation/pages/recipe_create_screen.dart @@ -305,12 +305,12 @@ class RecipeCreateScreen extends StatelessWidget { ), ), SizedBox(height: 24), - Text('Ссылка на видео (YouTube)'), + Text('Ссылка на видео (video)'), SizedBox(height: 8), CustomTextFormField( hintText: 'Введите описание шага', fillColor: appTheme.gray50, - controller: state.youtubeLinkController, + controller: state.videoLinkController, ), SizedBox(height: 24), Container( @@ -500,7 +500,7 @@ class RecipeCreateScreen extends StatelessWidget { description: state.stepDescriptionController.text, title: state.titleController.text, image: state.recipeImage?.path, - video_url: state.youtubeLinkController.text.isNotEmpty ? state.youtubeLinkController.text : null, + video_url: state.videoLinkController.text.isNotEmpty ? state.videoLinkController.text : null, ); return recipe; diff --git a/lib/features/recipes/presentation/pages/recipe_edit_screen.dart b/lib/features/recipes/presentation/pages/recipe_edit_screen.dart index 644b581d..dffccf3f 100644 --- a/lib/features/recipes/presentation/pages/recipe_edit_screen.dart +++ b/lib/features/recipes/presentation/pages/recipe_edit_screen.dart @@ -310,12 +310,12 @@ class RecipeEditScreen extends StatelessWidget { ), ), SizedBox(height: 24), - Text('Ссылка на видео (YouTube)'), + Text('Ссылка на видео (video)'), SizedBox(height: 8), CustomTextFormField( hintText: 'Введите описание шага', fillColor: appTheme.gray50, - controller: state.youtubeLinkController, + controller: state.videoLinkController, ), SizedBox(height: 24), Container( @@ -509,7 +509,7 @@ class RecipeEditScreen extends StatelessWidget { description: state.stepDescriptionController.text, title: state.titleController.text, image: state.recipeImage?.path, - video_url: state.youtubeLinkController.text.isNotEmpty ? state.youtubeLinkController.text : null, + video_url: state.videoLinkController.text.isNotEmpty ? state.videoLinkController.text : null, ); return recipe; } diff --git a/pubspec.yaml b/pubspec.yaml index 5b8ed7b4..b207496d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.0.4+19 +version: 1.0.6+21 publish_to: "none" environment: