buildHighlightTransition function
Implementation
Widget buildHighlightTransition({required BuildContext context, required Animation<double> highlight,
required Widget child, Color? background, Color? highlightColor}) {
return DecoratedBoxTransition(
decoration: DecorationTween(
begin: background != null ?
BoxDecoration(color: background) :
BoxDecoration(),
end: background != null ?
BoxDecoration(color: background) :
BoxDecoration(color: highlightColor)
).animate(highlight),
child: child
);
}