in frontend/frontend-flutter/lib/screens/bot.dart [115:177]
Widget build(BuildContext context) {
screenSize = MediaQuery.of(context).size;
chat = Chat(
emptyState: Text(""),
avatarBuilder: avatarBuilder,
customBottomWidget: CustomInputField(
onAttachmentPressed: _handleAttachmentPressed,
onSendPressed: _handleSendPressed,
db: widget.db,
options: cif.InputOptions(
textEditingController: widget.textEditingController)),
customMessageBuilder: customMessageBuilder,
//inputOptions: InputOptions(textEditingController: widget.textEditingController),
messages: _messages,
onSendPressed: _handleSendPressed,
//onAttachmentPressed: _handleImageSelection,
//onAttachmentPressed: _handleFileSelection
onAttachmentPressed: _handleAttachmentPressed,
onMessageTap: _handleMessageTap,
onPreviewDataFetched: _handlePreviewDataFetched,
showUserAvatars: true,
showUserNames: true,
bubbleBuilder: _bubbleBuilder,
user: _user,
messageWidthRatio: 0.9,
theme: DefaultChatTheme(
seenIcon: Text(
'read',
style: TextStyle(
fontSize: 10.0,
),
),
backgroundColor: Color(
0xFFF0F2F6), //Color.fromRGBO(242, 242, 242, 1.0),//Colors.black12,
messageMaxWidth: screenSize!.width,
),
);
print(
" bot: build() : TextToDocParameter.isTextTodocGlobal = ${TextToDocParameter.isTextTodocGlobal}");
return Flexible(
fit: FlexFit.loose,
flex: 9,
child: Stack(children: <Widget>[
Screenshot(child: chat!, controller: screenshotController1),
isProcessing
? Positioned(
left: 650,
top: 300,
child: SizedBox(
width: 100,
height: 100,
child: CircularProgressIndicator(
strokeWidth: 6,
),
),
)
: dummyFunction(),
]),
);
}