High order function that provide a mechanism to build the expanded card.
Could be used in an onTap handler to customize the route, eg:
onTap: (context, buildExpandedCard) {
Navigator.of(context).push(
ExpandingCardRoute(
fullscreenDialog: true,
maintainState: true,
builder: (context) {
return buildExpandedCard(context);
},
)
);