userName method

String userName()

Generates a user name.

The user name can contain one of the following: -._ combined with first name and last name.

Example:

  faker.internet.userName();

Implementation

String userName() =>
    ([random.element(firstnames), random.element(lastnames)]..shuffle())
        .join(random.element(['_', '.', '-']))
        .toLowerCase();