Whenever _Layout
delegate is updated, this function would be called with the previous version of _Layout
.
And this function says if the CustomMultiChildLayout
should do redraw.
In demo/”Hello world” example, for simplicity (but worse performance), I always say that it should redraw, but in production, I would compare the old object to the new one and return true
if the re-layout is needed, otherwise false
.
In this example _Layout
does not have any parameters and by that, they do not change so I might return false as well — I’ve returned true
due to the habit when writing demo code (Don’t do it in production :) )