Button constructor

Button({
  1. required Mobject mob,
  2. void onClick()?,
})

Implementation

Button({required Mobject mob, void Function()? onClick})
    : super(mobject: mob) {
  this.onClick = onClick ?? () => {};
}