password method

String password({
  1. int length = 10,
})

Generates a password with the given length if provided. If not provided length is 10.

Example:

  faker.internet.password();

Implementation

String password({int length = 10}) => random.string(length, min: length);