sendZaloMessage static method

Future<bool> sendZaloMessage(
  1. String phoneNumber, {
  2. String? message,
  3. BuildContext? context,
})

Gửi tin nhắn Zalo (mở chat)

Implementation

static Future<bool> sendZaloMessage(
  String phoneNumber, {
  String? message,
  BuildContext? context,
}) async {
  // Zalo không hỗ trợ pre-filled message qua deep link
  // Chỉ có thể mở chat, user phải tự gõ tin nhắn
  if (context != null && message != null && message.isNotEmpty) {
    _showInfo(context, 'Lưu ý: Bạn cần tự nhập nội dung tin nhắn trong Zalo');
  }

  return await openZaloChat(phoneNumber, context: context);
}