
Editorial "today" cards are large, image-led cards that spring open into a full article. Scrolling the
article works normally; pulling down from the top shrinks the article back into a card. This guide builds an
original version of that interaction pattern with ExpandableAnimation.
The card
AspectRatio(
aspectRatio: 0.85,
child: ExpandableAnimation(
borderRadius: BorderRadius.circular(24),
physics: ExpandableAnimationPhysics.snappy,
backgroundBlur: 6,
backgroundOpacity: 0.3,
collapsedColor: story.colors.first,
expandedColor: Theme.of(context).colorScheme.surface,
semanticLabel: 'Read ${story.title}',
expandedBuilder: (context) => ArticlePage(story: story),
child: StoryCard(story: story),
),
)
The article
The article starts with the same card artwork, so the morph reads as the card opening up, followed by scrollable text:
CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: SizedBox(height: headerHeight, child: StoryCard(story: story)),
),
SliverPadding(
padding: const EdgeInsets.all(24),
sliver: SliverList.list(children: paragraphs),
),
],
)
Scrolling versus dismissing
- Scrolling down reads the article as usual.
- Scrolling back up stops at the top like any list.
- Pulling down while at the top shrinks the card and fades the background; release to dismiss or let it spring back.
- By default, scrollables inside the expanded view use clamping physics, so iOS bounce does not compete
with the pull-down. Set
clampScrollPhysics: falsein the gesture config to keep bouncing.
Try it
Open the App Store-style cards demo. Related: spring morphing and drag-to-dismiss, and the iOS-style animations overview.