showProductPage static method
Implementation
static Future<void> showProductPage({
required BuildContext context,
required ProofType proofType,
PriceMetaProduct? product,
}) async {
if (!await ProductRefresher().checkIfLoggedIn(
context,
isLoggedInMandatory: true,
)) {
return;
}
if (!context.mounted) {
return;
}
final PriceAddHelper priceAddHelper = PriceAddHelper(context);
final Currency currency = priceAddHelper.getCurrency();
final PriceModel model = PriceModel(
proofType: proofType,
initialProduct: product,
currency: currency,
multipleProducts: product == null,
);
await Navigator.of(context, rootNavigator: true).push(
MaterialPageRoute<void>(
builder: (BuildContext context) => ProductPriceAddPage(model),
),
);
}