openChat method
void
openChat()
Internal method to handle chat opening logic.
Implementation
void openChat() {
if (isChatOpen) {
return;
}
isChatOpen = true;
closeTimer?.cancel();
final bool success = notifyParent(isOpen: true);
// Only open the container if the callback was successful
if (success) {
Future.delayed(const Duration(milliseconds: 50), () {
openContainerCallback?.call();
});
} else {
// If the callback failed, reset the state
isChatOpen = false;
}
}