mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
refactor: popular [wip]
mod: grpc request
This commit is contained in:
@@ -25,6 +25,14 @@ import '../models/github/latest.dart';
|
||||
class Utils {
|
||||
static final Random random = Random();
|
||||
|
||||
static String generateRandomString(int length) {
|
||||
const characters = '0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
Random random = Random();
|
||||
|
||||
return String.fromCharCodes(Iterable.generate(length,
|
||||
(_) => characters.codeUnitAt(random.nextInt(characters.length))));
|
||||
}
|
||||
|
||||
static String genAuroraEid(int uid) {
|
||||
if (uid == 0) {
|
||||
return ''; // Return null for a UID of 0
|
||||
|
||||
Reference in New Issue
Block a user