Impoved autocomplete and partial encoding error fix

This commit is contained in:
2024-03-04 14:04:09 +03:00
parent 6c03971f18
commit 1fa05eae5f
2 changed files with 58 additions and 119 deletions

View File

@@ -170,7 +170,6 @@ class DiaryEditBloc extends Bloc<DiaryEditEvent, DiaryEditState> {
final credentials = {
'satiety': selectedSatiety,
};
print(json.encode(credentials));
var response = await http.post(Uri.parse(url),
headers: {
'Authorization': 'Bearer $token',
@@ -465,8 +464,9 @@ class DiaryEditBloc extends Bloc<DiaryEditEvent, DiaryEditState> {
AddComment event, Emitter<DiaryEditState> emit) async {
if (state is DiaryEditLoadedState) {
var currentState = state as DiaryEditLoadedState;
var updatedState =
currentState.copyWith(commentController: event.comment);
var updatedState = currentState.copyWith(
commentController: TextEditingController(text: event.comment),
);
// Отправляем данные по HTTP маршруту и ждем ответ
var response = await sendCommentData(