flutter ontap error ontap stopped working

i’m getting null error in flutter button stopped working after added if statement inside the ontap here is my flutter code

import 'package:efood_multivendor/controller/product_controller.dart';
import 'package:efood_multivendor/util/dimensions.dart';
import 'package:flutter/material.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_instance/src/extension_instance.dart';
import 'package:get/get_utils/src/extensions/internacionalization.dart';

import 'custom_snackbar.dart';

class QuantityButton extends StatelessWidget {
  final bool isIncrement;
  final Function onTap;
  final int quantity;
  final int stock;
      {@required this.isIncrement,
      @required this.onTap,
      @required this.quantity,
      @required this.stock});

  Widget build(BuildContext context) {
    return InkWell(
       onTap : onTap({
        if (!isIncrement && quantity > 1) {
        } else if (isIncrement) {
          if (quantity < stock) {
          } else {
      child: Container(
        height: 22,
        width: 22,
        margin: EdgeInsets.symmetric(horizontal: Dimensions.PADDING_SIZE_SMALL),
        decoration: BoxDecoration(
          shape: BoxShape.circle,
          border: Border.all(
              width: 1,
              color: isIncrement
                  ? Theme.of(context).primaryColor
                  : Theme.of(context).disabledColor),
          color: isIncrement
              ? Theme.of(context).primaryColor
              : Theme.of(context).disabledColor.withOpacity(0.2),
        alignment: Alignment.center,
        child: Icon(
          isIncrement ? Icons.add : Icons.remove,
          size: 15,
          color: isIncrement
              ? Theme.of(context).cardColor
              : Theme.of(context).disabledColor,

if i try removing if statement and add onTap:onTap it is working i’m getting Another exception was thrown: NoSuchMethodError: '<Unexpected Null Value>' error still button not working