formatChecklist function
Format a list of items as a markdown checklist.
Implementation
String formatChecklist(List<({String text, bool checked})> items) {
return items
.map((item) => '- [${item.checked ? 'x' : ' '}] ${item.text}')
.join('\n');
}