dynamic
build(- dynamic context
)
Implementation
@override
Widget build(BuildContext context) {
final ProductPreferences productPreferences =
context.watch<ProductPreferences>();
return GestureDetector(
onTap: () => _openProductPage(context),
onVerticalDragEnd: (DragEndDetails details) {
if (details.primaryVelocity == null) {
return;
}
if (details.primaryVelocity! < 0) {
_openProductPage(context);
}
},
child: Hero(
tag: product.barcode ?? '',
child: SummaryCard(product, productPreferences),
),
);
}