shouldRelayout method
bool
shouldRelayout(
- covariant SliverGridDelegateWithFixedCrossAxisCountAndFixedHeight oldDelegate
override
Override this method to return true when the children need to be laid out.
This should compare the fields of the current delegate and the given
oldDelegate
and return true if the fields are such that the layout would
be different.
Implementation
@override
bool shouldRelayout(
SliverGridDelegateWithFixedCrossAxisCountAndFixedHeight oldDelegate) {
return oldDelegate.crossAxisCount != crossAxisCount ||
oldDelegate.mainAxisSpacing != mainAxisSpacing ||
oldDelegate.crossAxisSpacing != crossAxisSpacing ||
oldDelegate.height != height;
}