Skip to content

feat: add indicatorSpacing, indicatorLeadingWidget, and indicatorTrailingWidget to Carousel#2324

Merged
usmanvrtx merged 2 commits into
android_TV_implementationfrom
carousel-indicator-enhancements
Jul 23, 2026
Merged

feat: add indicatorSpacing, indicatorLeadingWidget, and indicatorTrailingWidget to Carousel#2324
usmanvrtx merged 2 commits into
android_TV_implementationfrom
carousel-indicator-enhancements

Conversation

@usmanvrtx

@usmanvrtx usmanvrtx commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds three new properties to the Carousel widget to enhance indicator customization:

  • indicatorLeadingWidget: A custom widget displayed before the indicator row or column.
  • indicatorTrailingWidget: A custom widget displayed after the indicator row or column.

These additions allow developers to place custom widgets alongside the carousel indicators for richer UI interactions.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

What Has Changed

  • Added indicatorLeadingWidget, and indicatorTrailingWidget fields to the Carousel schema definition (ensemble_schema.json)
  • Implemented the corresponding controller fields and state widget builders in carousel.dart
  • Updated the indicator rendering logic to support leading/trailing widgets with configurable spacing

How to Test

  1. Add indicatorLeadingWidget and/or indicatorTrailingWidget to a Carousel widget definition
  2. Verify the widgets render correctly in both horizontal and vertical orientations

Screenshots / Videos

N/A

Checklist

  • I have run flutter analyze and addressed any new warnings
  • I have run flutter test and all tests pass
  • I have tested my changes on the relevant platform(s)
  • I have updated documentation if needed
  • My changes do not introduce new warnings or errors

@usmanvrtx
usmanvrtx requested a review from TheNoumanDev July 23, 2026 09:55
@usmanvrtx usmanvrtx self-assigned this Jul 23, 2026
@usmanvrtx
usmanvrtx merged commit e0e7cb5 into android_TV_implementation Jul 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants