buildCheckboxPreview function

Widget buildCheckboxPreview(
  1. CheckboxState state,
  2. AnimationController? borderAnimationController
)

Checkbox preview builder Builds preview widgets for checkbox component with animated border support

Implementation

Widget buildCheckboxPreview(
  CheckboxState state,
  AnimationController? borderAnimationController,
) {
  return StateVariantsWrapper(
    componentName: 'Checkbox',
    buildRestState: () => _buildInteractiveCheckbox(state, borderAnimationController),
    buildPressedState: () => _buildForcedStateCheckbox(state, borderAnimationController, forcePressed: true),
    buildHoverState: () => _buildForcedStateCheckbox(state, borderAnimationController, forceHovered: true),
    buildDisabledState: () => _buildDisabledCheckbox(state, borderAnimationController),
    buildCyclingState: (stateIndex) => _buildCyclingCheckbox(state, borderAnimationController, stateIndex),
    cycleDuration: const Duration(milliseconds: 2000),
  );
}