CPBarButton constructor

CPBarButton({
  1. required OnClickEvents onClickEvent,
  2. CPBarButtonStyles style = CPBarButtonStyles.rounded,
  3. bool isEnabled = true,
  4. String? image,
  5. String? title,
})

Creates CPBarButton

Implementation

CPBarButton({
  required this.onClickEvent,
  this.style = CPBarButtonStyles.rounded,
  this.isEnabled = true,
  this.image,
  this.title,
})  : assert(
        image != null || title != null,
        "Properties [image] and [title] both can't be null at the same time.",
      ),
      assert(
        image == null || title == null,
        "Properties [image] and [title] both can't be set at the same time.",
      );