buildNewsContentCardPreview function
Widget
buildNewsContentCardPreview(
- NewsContentCardState state,
- 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),
);
}