import 'on_chat_message.dart'; class OnChatMsgInstance{ factory OnChatMsgInstance() => _getInstance(); static OnChatMsgInstance get instance => _getInstance(); static OnChatMsgInstance? _instance; OnChatMessage? onChatMessage; OnChatMsgInstance._internal(); static OnChatMsgInstance _getInstance(){ if(_instance == null){ _instance = OnChatMsgInstance._internal(); } return _instance!; } }