configScreen method
void
configScreen()
Implementation
void configScreen() {
primaryColor = widget.model.primaryColor!.toColor();
secondaryColor = widget.model.secondaryColor!.toColor();
widget.model.listMessages?.forEach((message) {
_messages.insert(0,
ChatMessageWidget (
bgColor: !(message.isAI ?? true) ? primaryColor : secondaryColor,
time: message.time,
message: message.message ?? "",
isAI: message.isAI ?? true
)
);
});
if((widget.model.listMessages?.isNotEmpty ?? false) && !(widget.model.listMessages!.last.isAI ?? false)) {
callApi();
}
_listSuggestions = widget.model.listSuggestions ?? [];
}