getMessageItemBuilder method

  1. @override
Widget getMessageItemBuilder({
  1. Key? key,
  2. MessageItemBuilderWidgets? widgets,
  3. required MessageItemBuilderData data,
  4. required MessageItemBuilderMethods methods,
})
override

Implementation

@override
Widget getMessageItemBuilder({
  Key? key,
  MessageItemBuilderWidgets? widgets,
  required MessageItemBuilderData data,
  required MessageItemBuilderMethods methods,
}) {
  Widget? widget;

  if (_messageItemBuilder != null) {
    widget = _messageItemBuilder!(
      key: key,
      widgets: widgets ??
          MessageItemBuilderWidgets(
            messageItemView: TencentCloudChatMessageItemBuilders.getMessageItemBuilder(
              data: data,
              methods: methods,
            ),
          ),
      data: data,
      methods: methods,
    );
  }

  return widget ??
      TencentCloudChatMessageItemBuilders.getMessageItemBuilder(
        data: data,
        methods: methods,
      );
}