Initial commit
This commit is contained in:
9
lib/widgets/widget_generate.dart
Normal file
9
lib/widgets/widget_generate.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
import 'dart:math';
|
||||
|
||||
class StringGenerator{
|
||||
static const _chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890';
|
||||
Random _rnd = Random();
|
||||
|
||||
String getRandomString(int length) => String.fromCharCodes(Iterable.generate(
|
||||
length, (_) => _chars.codeUnitAt(_rnd.nextInt(_chars.length))));
|
||||
}
|
||||
Reference in New Issue
Block a user