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