GFCheckbox constructor

const GFCheckbox({
  1. Key? key,
  2. double size = GFSize.MEDIUM,
  3. GFCheckboxType type = GFCheckboxType.basic,
  4. Color activeBgColor = GFColors.PRIMARY,
  5. Color inactiveBgColor = GFColors.WHITE,
  6. Color activeBorderColor = GFColors.WHITE,
  7. Color inactiveBorderColor = GFColors.DARK,
  8. required ValueChanged<bool>? onChanged,
  9. required bool value,
  10. Widget activeIcon = const Icon(Icons.check, size: 20, color: GFColors.WHITE),
  11. Widget? inactiveIcon,
  12. Color customBgColor = GFColors.SUCCESS,
  13. bool autofocus = false,
  14. FocusNode? focusNode,
  15. FormFieldValidator<bool>? validator,
})

GFCheckbox is a small box (as in a checklist) in which to place a check mark to make a selection with various customization options.

Implementation

const GFCheckbox({
  Key? key,
  this.size = GFSize.MEDIUM,
  this.type = GFCheckboxType.basic,
  this.activeBgColor = GFColors.PRIMARY,
  this.inactiveBgColor = GFColors.WHITE,
  this.activeBorderColor = GFColors.WHITE,
  this.inactiveBorderColor = GFColors.DARK,
  required this.onChanged,
  required this.value,
  this.activeIcon = const Icon(
    Icons.check,
    size: 20,
    color: GFColors.WHITE,
  ),
  this.inactiveIcon,
  this.customBgColor = GFColors.SUCCESS,
  this.autofocus = false,
  this.focusNode,
  this.validator,
}) : super(key: key);