We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15fb076 commit 74bdfe3Copy full SHA for 74bdfe3
lib/content_management/bloc/create_category/create_category_bloc.dart
@@ -79,11 +79,14 @@ class CreateCategoryBloc
79
80
emit(state.copyWith(status: CreateCategoryStatus.submitting));
81
try {
82
+ final now = DateTime.now();
83
final newCategory = Category(
84
name: state.name,
85
description: state.description.isNotEmpty ? state.description : null,
86
iconUrl: state.iconUrl.isNotEmpty ? state.iconUrl : null,
87
status: state.contentStatus,
88
+ createdAt: now,
89
+ updatedAt: now,
90
);
91
92
await _categoriesRepository.create(item: newCategory);
0 commit comments