foreignKey method

String foreignKey()

Converts a string into a foreign key name.

Implementation

String foreignKey() {
  if (this == null) {
    throw ArgumentError('string: $this');
  }
  if (this!.isEmpty) {
    return '';
  }
  return '${this!.variablize()}_id';
}