getCallIcon static method
Widget
getCallIcon(
- BuildContext context,
- CallLog callLog,
- User? loggedInUser,
- CometChatColorPalette colorPalette,
- CometChatTypography typography,
- CometChatSpacing spacing,
- CometChatCallLogsStyle style, {
- Widget? incomingCallIcon,
- Widget? outgoingCallIcon,
- Widget? missedCallIcon,
getCallIcon Return call status icon: the missed icon for a missed call (isMissedCallLog), otherwise outgoing or incoming by direction, whatever the status.
Implementation
static Widget getCallIcon(
BuildContext context,
CallLog callLog,
User? loggedInUser,
CometChatColorPalette colorPalette,
CometChatTypography typography,
CometChatSpacing spacing,
CometChatCallLogsStyle style, {
Widget? incomingCallIcon,
Widget? outgoingCallIcon,
Widget? missedCallIcon,
}) {
if (isMissedCallLog(callLog, loggedInUser)) {
return missedCallIcon ??
Icon(
Icons.call_missed_outgoing_rounded,
color: style.missedCallIconColor ?? colorPalette.error,
size: 16,
);
}
if (callLogLoggedInUser(callLog, loggedInUser)) {
return outgoingCallIcon ??
Icon(
Icons.call_made_outlined,
color: style.outgoingCallIconColor ?? colorPalette.success,
size: 16,
);
}
return incomingCallIcon ??
Icon(
Icons.call_received_outlined,
color: style.incomingCallIconColor ?? colorPalette.success,
size: 16,
);
}