linearTranslateWithLargestRectSizeTween function
Navigation bars' hero rect tween that will move between the static bars but keep a constant size that's the bigger of both navigation bars.
Implementation
RectTween linearTranslateWithLargestRectSizeTween(Rect? begin, Rect? end) {
final Size largestSize = Size(
max(begin!.size.width, end!.size.width),
max(begin.size.height, end.size.height),
);
return RectTween(
begin: begin.topLeft & largestSize,
end: end.topLeft & largestSize,
);
}