INNER CODE UNIT · Dart

minPercent

bmaroti9/Overmorrow · lib/daily.dart:273

                        final double minPercent = min(max((day.minTempC - lowest) / (highest - lowest), 0), 1);
                        final double maxPercent = min(max((day.maxTempC - lowest) / (highest - lowest), 0), 1);
                        return Align(
                          alignment: Alignment.centerLeft,
                          child: Container(
                            margin: EdgeInsets.only(left: min(width * minPercent, width - smallest)),
                            width: max(smallest, (maxPercent - minPercent) * width),
                            height: 16,
                            decoration: BoxDecoration(
                                borderRadius: BorderRadius.circular(20),
                                color: Theme.of(context).colorScheme.primaryFixedDim
                            ),
                          ),
                        );
                      }
                  ),
                )
            ),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…