What's the difference between double.infinity and double.maxFinite in Dart? What's the difference between double.infinity and double.maxFinite in Dart? dart dart

What's the difference between double.infinity and double.maxFinite in Dart?


The difference can be summarized into:

  • I want to be as big as my parent allows (double.infinity)

Some Widgets allow their children to be as big as they want to be

Column, ListView, OverflowBox In that situation use double.infinity

According to the documentation, these are the values assigned to the various double constants.

static const double infinity = 1.0 / 0.0;static const double negativeInfinity = -infinity;static const double minPositive = 5e-324;static const double maxFinite = 1.7976931348623157e+308;

I hope this answers your question