edit method
- required BuildContext context,
- required Product product,
- bool isLoggedInMandatory = true,
override
Opens a page to edit that field for that product.
Implementation
@override
Future<void> edit({
required BuildContext context,
required Product product,
bool isLoggedInMandatory = true,
}) async {
if (!await ProductRefresher().checkIfLoggedIn(
context,
isLoggedInMandatory: isLoggedInMandatory,
)) {
return;
}
AnalyticsHelper.trackProductEdit(
helper.getEditEventAnalyticsTag(),
product,
);
if (!context.mounted) {
return;
}
await Navigator.push<void>(
context,
MaterialPageRoute<void>(
builder: (BuildContext context) => EditOcrPage(
product: product,
helper: helper,
isLoggedInMandatory: isLoggedInMandatory,
),
),
);
}