I have copied full Random
class from math.dart
package, gave it CustomRandom
name, and now I don't see why my code fails to work.
abstract class CustomRandom {
external factory CustomRandom([int seed]);
external factory CustomRandom.secure();
int nextInt(int max);
double nextDouble();
bool nextBool();
}
I'm using it like
print("${Random().nextInt(10)}"); // standard one works
print("${CustomRandom().nextInt(10)}"); // my one fails
I know there are other things going around with standard class which isn't visible in code, but how can I make my class to work?