TencentCloud / chat-uikit-flutter

A powerful Flutter chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.
https://trtc.io/products/chat?utm_source=gfs&utm_medium=link&utm_campaign=%E6%B8%A0%E9%81%93&_channel_track_key=k6WgfCKn
BSD 3-Clause "New" or "Revised" License
148 stars 107 forks source link

flutter 集成 #45

Open ZhangX-Byte opened 3 months ago

ZhangX-Byte commented 3 months ago

` import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';

class MessagePage extends StatefulWidget { const MessagePage({super.key});

@override State createState() => _MessagePageState(); }

class _MessagePageState extends State { final CoreServicesImpl _coreInstance = TIMUIKitCore.getInstance();

@override void initState() { super.initState(); WidgetsBinding.instance.addPostFrameCallback((_) async {}); _coreInstance.init( sdkAppID: 0, // Replace 0 with the SDKAppID of your IM application when integrating // language: LanguageEnum.en, // 界面语言配置,若不配置,则跟随系统语言 loglevel: LogLevelEnum.V2TIM_LOG_DEBUG, onTUIKitCallbackListener: (TIMCallback callbackValue) {}, // 建议配置,详见此部分 listener: V2TimSDKListener()); super.initState(); }

@override Widget build(BuildContext context) { return Container(); } } `

报错

`Launching lib/main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... ../../../../.pub-cache/hosted/pub.dev/tencent_cloud_chat_uikit-2.6.0+2/lib/ui/views/TIMUIKitConversation/tim_uikit_conversation.dart:163:5: Error: The getter 'model' isn't defined for the class '_TIMUIKitConversationState'.

ZhangX-Byte commented 3 months ago

使用 flutter Provider