Month: December 2024
Building a ListView which scrolls neatly by item
Recently I wanted to horizontally scrolling ListView to display a number of panels. This is relatively easy to achieve, but there were two things that I did not like about it. As it turns out both of these issues are also very easy to fix. First up, calculating the panel dimensions can be done by…
Using Provider to Share State Between Widgets
Today I needed to share a timer between two widgets. A quick search revealed that the way to go was to use Provider. So, as usual I looked for a good example of how to go about it. I didn’t actually find one, so instead I took a look at the official documentation (https://pub.dev/packages/provider). Unfortunately,…