buildNewsContentCardPreview function

Widget buildNewsContentCardPreview(
  1. NewsContentCardState state,
  2. AnimationController? borderAnimationController
)

News Content Card preview builder Category 3: Complex/Composite - News article card for elderly users

Implementation

Widget buildNewsContentCardPreview(
  NewsContentCardState state,
  AnimationController? borderAnimationController,
) {
  return StateVariantsWrapper(
    componentName: 'News Content Card',
    buildRestState: () => _buildInteractiveCard(state, borderAnimationController),
    buildPressedState: () => _buildStaticCard(state, borderAnimationController, buttonState: 'pressed'),
    buildHoverState: () => _buildStaticCard(state, borderAnimationController, buttonState: 'hover'),
    buildDisabledState: () => _buildStaticCard(state, borderAnimationController, isDisabled: true),
    buildCyclingState: (stateIndex) => _buildCyclingCard(state, borderAnimationController, stateIndex),
    cycleDuration: const Duration(milliseconds: 2000),
  );
}