See RaylibCoreDart.GetRandomValue.
int GetRandomValue( num min, num max, ) => _module.GetRandomValue(min, max);