toSnakeCase method

String toSnakeCase()

Implementation

String toSnakeCase() {
  final replaced = this.replaceAll(" ", "_");

  return replaced
      .split("_")
      .map((s) {
        return s.toLowerCase();
      })
      .toList()
      .join("_");
}