fix: youtube_url => video_url

This commit is contained in:
mso7nueh
2024-11-25 15:47:54 +03:00
parent 35d3855613
commit e4bca86b9e
12 changed files with 76 additions and 76 deletions

View File

@@ -12,14 +12,14 @@ class BlogPostCreateCubit extends Cubit<BlogPostCreateState> {
createBlogPost({
String? title,
String? youtubeURL,
String? videoUrl,
String? description,
XFile? image,
}) async {
emit(BlogPostCreateState.loading());
await blogPostRepository.createBlogPost(
title,
youtubeURL,
videoUrl,
description,
image,
);

View File

@@ -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;

View File

@@ -29,7 +29,7 @@ class _BlogPostCreateScreenState extends State<BlogPostCreateScreen> {
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<BlogPostCreateScreen> {
blogPostCubit.createBlogPost(
title: titleController.text,
description: descriptionController.text,
youtubeURL: youtubeUrlController.text,
videoUrl: videoUrlController.text,
image: image,
);
},
@@ -167,15 +167,15 @@ class _BlogPostCreateScreenState extends State<BlogPostCreateScreen> {
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),
],

View File

@@ -13,7 +13,7 @@ class BlogPostRepository {
Future<void> 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,
});

View File

@@ -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,

View File

@@ -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;

View File

@@ -14,7 +14,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
image: json['image'] as String,
description: json['description'] as String,
author: Author.fromJson(json['author'] as Map<String, dynamic>),
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<String, dynamic> _$$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,

View File

@@ -76,7 +76,7 @@ class RecipeCreateCubit extends Cubit<RecipeCreateState> {
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<RecipeCreateState> {
productNameController: TextEditingController(),
ingredientController: TextEditingController(),
stepDescriptionController: TextEditingController(),
youtubeLinkController: TextEditingController(),
videoLinkController: TextEditingController(),
stepControllers: [TextEditingController()],
stepImages: [null],
autocompleteList: [],

View File

@@ -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<TextEditingController> stepControllers,
XFile? recipeImage,
required List<XFile?> stepImages,

View File

@@ -27,7 +27,7 @@ mixin _$RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -56,7 +56,7 @@ mixin _$RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -85,7 +85,7 @@ mixin _$RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -202,7 +202,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -234,7 +234,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -266,7 +266,7 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -386,7 +386,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -418,7 +418,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -450,7 +450,7 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -530,7 +530,7 @@ abstract class _$$RecipeCreateStateLoadedImplCopyWith<$Res> {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> 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<TextEditingController> stepControllers,
this.recipeImage,
required final List<XFile?> stepImages,
@@ -761,7 +761,7 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
@override
final TextEditingController stepDescriptionController;
@override
final TextEditingController youtubeLinkController;
final TextEditingController videoLinkController;
final List<TextEditingController> _stepControllers;
@override
List<TextEditingController> 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<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> 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<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> 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<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> 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<TextEditingController> stepControllers,
final XFile? recipeImage,
required final List<XFile?> 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<TextEditingController> get stepControllers;
XFile? get recipeImage;
List<XFile?> get stepImages;
@@ -1246,7 +1246,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -1278,7 +1278,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,
@@ -1310,7 +1310,7 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
TextEditingController productNameController,
TextEditingController ingredientController,
TextEditingController stepDescriptionController,
TextEditingController youtubeLinkController,
TextEditingController videoLinkController,
List<TextEditingController> stepControllers,
XFile? recipeImage,
List<XFile?> stepImages,

View File

@@ -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;

View File

@@ -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;
}