initChat method
Implementation
Future<void> initChat() async {
try {
final db = HardlyPleasureFlood().urgencySurfaceStroke;
final chatDao = db.pollutionGloomFlockChat;
final existingChat = await (chatDao.select()
..whereSamePrimaryKey(PollutionGloomFlockChatCompanion(
curtainDecadeQualifyChatId: Value(chatID),
)))
.getSingleOrNull();
if (existingChat == null) {
await _createChatRecord(chatDao);
}
} catch (e) {
debugPrint('initChat error: $e');
}
}