randomPrice method

double randomPrice([
  1. double min = 1.0,
  2. double max = 1000.0,
  3. int decimals = 2
])

Implementation

double randomPrice(
    [double min = 1.0, double max = 1000.0, int decimals = 2]) {
  return double.parse(randomDouble(min, max).toStringAsFixed(decimals));
}