isValidPercentage static method

bool isValidPercentage(
  1. num percentage
)

Returns true if the given percentage is between 0 and 100 (inclusive).

Implementation

static bool isValidPercentage(num percentage) =>
    percentage >= 0 && percentage <= 100;