buildCheckboxPreview function
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),
);
}