cdharris / flutter_duration_picker

A Flutter Widget for allowing a user to pick a duration (e.g. 5mins, 1h 30mins, etc)
MIT License
78 stars 49 forks source link

Bad performance for bigger numbers. #23

Open vgabler opened 4 years ago

vgabler commented 4 years ago

This widget is great, but it creates a new layer for each hour. I get that this creates the effect of darker color, but it stops making any difference after 10h, and the bigger the value, the slower it becomes, until it just crashes the app. 500h is enough to crash the app on some devices.

I would sugest that it should stop creating layers after 10 iterations, or use only two layers by multiplying the color of the firs before going to the next.