TIMUIKitChatProviderScope constructor
TIMUIKitChatProviderScope({
- Key? key,
- Widget? child,
- List<
SingleChildWidget> ? providers, - List<
V2TimGroupMemberFullInfo?> ? groupMemberList, - TIMUIKitInputTextFieldController? textFieldController,
- required Widget builder(),
- TUIChatSeparateViewModel? model,
- String? groupID,
- bool? isBuild,
- required String conversationID,
- required ConvType conversationType,
- TIMUIKitChatController? controller,
- TIMUIKitChatConfig? config,
- ChatLifeCycle? lifeCycle,
- AutoScrollController? scrollController,
Implementation
TIMUIKitChatProviderScope(
{Key? key,
this.child,
this.providers,
this.groupMemberList,
this.textFieldController,
required this.builder,
this.model,
this.groupID,
this.isBuild,
required this.conversationID,
required this.conversationType,
this.controller,
this.config,
this.lifeCycle,
this.scrollController})
: super(key: key) {
if (isBuild ?? false) {
return;
}
model ??= TUIChatSeparateViewModel();
controller?.model = model;
controller?.textFieldController = textFieldController;
controller?.scrollController = scrollController;
if (config != null) {
model?.chatConfig = config!;
}
model?.lifeCycle = lifeCycle;
model?.initForEachConversation(
conversationType,
conversationID,
(String value) {
textFieldController?.textEditingController?.text = value;
},
preGroupMemberList: groupMemberList,
groupID: groupID,
);
model?.showC2cMessageEditStatus = (conversationType == ConvType.c2c ? config?.showC2cMessageEditStatus ?? true : false);
loadData();
}