StatsFl constructor

StatsFl({
  1. Key? key,
  2. Widget? child,
  3. double width = 120,
  4. double height = 40,
  5. double totalTime = 15,
  6. double sampleTime = .5,
  7. int maxFps = 60,
  8. bool isEnabled = true,
  9. Alignment? align,
  10. bool showText = true,
})

Implementation

StatsFl(
    {Key? key,
    this.child,
    this.width = 120,
    this.height = 40,
    this.totalTime = 15,
    this.sampleTime = .5,
    this.maxFps = 60,
    this.isEnabled = true,
    this.align,
    this.showText = true})
    : super(key: key) {
  assert(width >= 80, "width must be >= 80px");
  assert(sampleTime > 0, "sampleTime must be > 0.");
  assert(totalTime >= sampleTime * 2, "totalTime must at least twice sampleTime");
  assert((showText != true || height >= 20), "If showText=true, height must be at least 20px");
  assert((height >= 8), "height must be >= 8px");
}