string static method
String
string(
- int length, {
- int from = asciiStart,
- int to = asciiEnd,
- AbstractRandomProvider provider = const DefaultRandomProvider(),
Generates a random string of length
with characters
between ascii from
to to
.
Defaults to characters of ascii '!' to '~'.
Implementation
static String string(
int length, {
int from = asciiStart,
int to = asciiEnd,
AbstractRandomProvider provider = const DefaultRandomProvider(),
}) {
return String.fromCharCodes(
List.generate(
length,
(index) => between(from, to, provider: provider),
),
);
}