toSnakeCase property

String get toSnakeCase

Implementation

String get toSnakeCase => trim().isEmpty
    ? ''
    : trim().toLowerCase().replaceAll(RegExp(r'[\s-]+'), '_');