fixed range calculation in dart