buildButton method

Widget buildButton(
  1. BuildContext context,
  2. FastPlanBlocState state,
  3. ProductDetails product
)

Builds the purchase button if the user hasn't purchased the plan, otherwise returns an empty widget.

Implementation

Widget buildButton(
  BuildContext context,
  FastPlanBlocState state,
  ProductDetails product,
) {
  if (!state.hasPurchasedPlan) {
    return _buildPurchaseButton(context, state, product);
  }

  return const SizedBox.shrink();
}