forked from eatvio/eatvio_app
feat(chat): Layouts for chat select finished
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/chat/chat_select_screen/models/chat_select_model.dart';
|
||||
import 'package:eatvio_app/presentation/chat/chat_select_screen/models/chat_entry.dart'; // ignore: must_be_immutable
|
||||
part 'chat_select_event.dart';
|
||||
part 'chat_select_state.dart';
|
||||
|
||||
@@ -11,11 +12,38 @@ class ChatSelectBloc extends Bloc<ChatSelectEvent, ChatSelectState> {
|
||||
on<ChatSelectInitialEvent>(_onInitialize);
|
||||
}
|
||||
|
||||
List<ChatItemModel> fillChatEntryList() {
|
||||
return [
|
||||
ChatItemModel(
|
||||
userImage: ImageConstant.imgLogo,
|
||||
username: "Ксения Обрамова",
|
||||
dateText: "9/29",
|
||||
greetingText: "Привет, хорошая статья"),
|
||||
ChatItemModel(
|
||||
userImage: ImageConstant.imgLogo,
|
||||
username: "Ксения Обрамова",
|
||||
dateText: "9/29",
|
||||
greetingText: "Привет, хорошая статья"),
|
||||
ChatItemModel(
|
||||
userImage: ImageConstant.imgLogo,
|
||||
username: "Данил Иванов",
|
||||
dateText: "9/29",
|
||||
greetingText: "Посоветуй пожалуйста рецепт..."),
|
||||
ChatItemModel(
|
||||
userImage: ImageConstant.imgLogo,
|
||||
username: "Данил Иванов",
|
||||
dateText: "9/29",
|
||||
greetingText: "Посоветуй пожалуйста рецепт...")
|
||||
];
|
||||
}
|
||||
|
||||
_onInitialize(
|
||||
ChatSelectInitialEvent event,
|
||||
Emitter<ChatSelectState> emit,
|
||||
) async {
|
||||
emit(state.copyWith(
|
||||
chatSelectModelObj: state.chatSelectModelObj?.copyWith()));
|
||||
chatSelectModelObj: state.chatSelectModelObj?.copyWith(
|
||||
userprofileItemList: fillChatEntryList(),
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user