clickable method

Widget clickable({
  1. required Function onPress,
  2. required BuildContext context,
})

Implementation

Widget clickable({
  required Function onPress,
  required BuildContext context,
}) {
  return InkWell(
    onTap: () {
      Navigator.pop(context);
      onPress.call();
    },
    child: this,
  );
}