v1 release

This commit is contained in:
Sarthak Kimtani 2024-02-17 20:32:01 +05:30
commit cb24b68069
116 changed files with 4913 additions and 0 deletions

View file

@ -0,0 +1,12 @@
import "dart:math";
import "dart:ui";
Color getRandomColor() {
Random random = Random();
return Color.fromRGBO(
random.nextInt(256),
random.nextInt(256),
random.nextInt(256),
1,
);
}

View file

@ -0,0 +1,12 @@
import "dart:math";
String randomString(int length) {
const charset =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
final random = Random.secure();
final codeUnits = List<int>.generate(
length,
(index) => charset.codeUnitAt(random.nextInt(charset.length)),
);
return String.fromCharCodes(codeUnits);
}

View file

@ -0,0 +1,3 @@
final RegExp emailRegex = RegExp(
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$',
);