Skip to content

Add semanticIndexOffset argument to SliverList.builder, SliverGrid.builder, and SliverFixedExtentList.builder #173019

Closed

Description

@loic-sharma

Use case

SliverList.builder/SliverGrid.builder/SliverFixedExtentList.builder are convenience constructors for SliverList/SliverGrid/SliverFixedExtentList with a SliverChildBuilderDelegate item delegate.

The SliverChildBuilderDelegate accepts a semanticIndexOffset argument:

SliverGrid(
  gridDelegate: _gridDelegate,
  delegate: SliverChildBuilderDelegate(
    (BuildContext context, int index) {
      return const Text('...');
    },
    childCount: 2,
    semanticIndexOffset: 2,
  ),
),

However, SliverList.builder, SliverGrid.builder, and SliverFixedExtentList.builder do not accept a semanticIndexOffset argument. If you need to provide this argument, you are forced to use the delegate pattern instead of the convenience constructor.

Proposal

  • Add a semanticIndexOffset argument to SliverList.builder
  • Add a semanticIndexOffset argument to SliverGrid.builder
  • Add a semanticIndexOffset argument to SliverFixedExtentList.builder

For example:

SliverGrid.builder(
  gridDelegate: _gridDelegate,
  semanticIndexOffset: 2,
  itemCount: 2,
  itemBuilder: (BuildContext context, int index) {
    return const Text('...');
  },
),

Activity

  1. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    c: proposalA detailed proposal for a change to Flutter
    f: scrollingViewports, list views, slivers, etc.
    on Jul 31, 2025
  2. changed the title [-]Add semanticIndexOffset argument to SliverList.builder and SliverGrid.builder[/-] [+]Add semanticIndexOffset argument to SliverList.builder, SliverGrid.builder, and SliverFixedExtentList.builder[/+] on Jul 31, 2025
  3. added
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 5, 2025
  4. rodrigogmdias commented on Sep 3, 2025

    @rodrigogmdias
  5. loic-sharma commented on Sep 4, 2025

    @loic-sharma
    MemberAuthor

    @rodrigogmdias We assign pull request reviewers in our weekly triage meetings. Please don't ping folks directly for reviews as that just adds noise :)

  6. justinmc commented on Sep 23, 2025

    @justinmc
    Contributor

    Fixed with #174856

  7. github-actions commented on Oct 8, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecta: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions