improvements

design_3.0_GlobalHealth
Sikander Saleem 5 days ago
parent fd7a85f930
commit 19268d2ed1

@ -91,23 +91,33 @@ class _TemporaryChatUIState extends State<TemporaryChatUI> {
width: 50,
alignment: Alignment.center,
decoration: const BoxDecoration(shape: BoxShape.circle, color: AppColor.neutral30),
child: const Icon(Icons.send_rounded).onPress(() {
if (textEditingController.text.isNotEmpty) {
final comment = GasRefillComment(
id: 0,
gasRefillId: 0,
comment: textEditingController.text,
createdOn: DateTime.now().toIso8601String(),
createdBy: CreatedBy(userId: isSender ? "0" : "1", userName: isSender ? "Me" : "User"),
);
isSender = !isSender;
chatList.add(comment);
textEditingController.clear();
child: IconButton(
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: () {
if (textEditingController.text.isNotEmpty) {
final comment = GasRefillComment(
id: 0,
gasRefillId: 0,
comment: textEditingController.text,
createdOn: DateTime.now().toIso8601String(),
createdBy: CreatedBy(userId: isSender ? "0" : "1", userName: isSender ? "Me" : "User"),
);
isSender = !isSender;
chatList.add(comment);
textEditingController.clear();
chatList.sort((a, b) => DateTime.parse(b.createdOn!).compareTo(DateTime.parse(a.createdOn!)));
setState(() {});
}
})),
chatList.sort((a, b) => DateTime.parse(b.createdOn!).compareTo(DateTime.parse(a.createdOn!)));
setState(() {});
}
},
icon: const Icon(Icons.send_rounded))
// const Icon(Icons.send_rounded).onPress(() {
//
// })
),
],
),
),

Loading…
Cancel
Save