String camelToSnake(String camelStr) { return camelStr .replaceAllMapped(_camelToSnakeRegex, (match) => '_${match.group(0)}') .toLowerCase(); }