The problem was that we were using a StoreBuilder in main.dart, this meant any change rebuilt most of the app. The solution was to move the rebuilding further down the widget tree limiting it to just the parts of the app which needed to be updated....
Pattern: The pattern in this problem is that for each number in the list, we are trying to find its complement in the rest of the list. If we find it, we know that these two numbers add up to the target. By storing the numbers and their indices in a dictionary, we can ...