itemBuilder property
Custom member list item view.
If you want to use a custom member list item view, you can set the ZegoLiveStreamingMemberListConfig.itemBuilder property, and pass your custom view's builder function to it.
For example, suppose you have implemented a CustomMemberListItem
component that can render a member list item view based on the user information. You can set it up like this:
ZegoMemberListConfig(
itemBuilder: (BuildContext context, Size size, ZegoUIKitUser user, Map<String, dynamic> extraInfo) {
return CustomMemberListItem(user: user);
},
);
In this example, we pass the builder function of the custom view, CustomMemberListItem
, to the itemBuilder property so that the member list item will be rendered using the custom component.
Implementation
ZegoMemberListItemBuilder? itemBuilder;