createForString method

String createForString(
  1. List<String> options
)

Implementation

String createForString(List<String> options) {
  // Handle person case
  if (options.hasStartsWith('person')) {
    return _personFaker(options);
  }

  // Handle url
  if (options.hasStartsWith('url')) {
    return _urlFaker(options);
  }

  // Handle min/max options
  if (options.hasStartsWithOr(['max', 'min', 'chars'])) {
    return _minMaxFaker(options, type);
  }
  throw 'No faker could be generated for type `String` with options $options';
}