Skip to content

Commit 9b2f4b2

Browse files
committed
fix(headline-details): adjust padding and shader mask application
- Remove copyWith from horizontalPadding to ensure consistent padding - Apply padding directly to the ShaderMask's child to ensure correct shader application - Remove unnecessary comment
1 parent 3d146af commit 9b2f4b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/headline-details/view/headline_details_page.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class _HeadlineDetailsPageState extends State<HeadlineDetailsPage> {
378378
),
379379
),
380380
SliverPadding(
381-
padding: horizontalPadding.copyWith(top: AppSpacing.lg),
381+
padding: const EdgeInsets.only(top: AppSpacing.lg),
382382
sliver: SliverToBoxAdapter(
383383
child: SizedBox(
384384
height: 36,
@@ -398,7 +398,6 @@ class _HeadlineDetailsPageState extends State<HeadlineDetailsPage> {
398398
const SizedBox(width: AppSpacing.sm),
399399
itemBuilder: (context, index) => chips[index],
400400
// Apply horizontal padding directly to the ListView
401-
// to ensure consistent spacing at both ends. This is now handled by the parent SliverPadding.
402401
);
403402

404403
// Determine if the fade should be shown based on scroll position.
@@ -437,7 +436,9 @@ class _HeadlineDetailsPageState extends State<HeadlineDetailsPage> {
437436
stops: stops,
438437
).createShader(bounds),
439438
blendMode: BlendMode.dstIn,
440-
child: listView,
439+
// Apply padding here to ensure the ShaderMask is applied
440+
// to the correctly padded content area.
441+
child: Padding(padding: horizontalPadding, child: listView),
441442
);
442443
},
443444
),

0 commit comments

Comments
 (0)