This repository was archived by the owner on Oct 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 529
[ScrollablePositionedList] iOS screen reader (VoiceOver) doesn't focus on the item in initialScrollIndex #552
Copy link
Copy link
Open
Description
Problem description
I'm using scrollable_positioned_list to render a list of items. When using the iPhone screen reader (VoiceOver) to navigate the app, the screen reader focus doesn't move to the item in initialScrollIndex, but jumps to an earlier item in the list. On Android (TalkBack) it works as expected.
Steps to reproduce
main.dart:
import 'package:flutter/material.dart';
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<Widget> contentCards = [];
@override
void initState() {
super.initState();
for (int i = 0; i < 100; i++) {
contentCards.add(
Card(
child: ListTile(
title: Text('Item $i'),
),
),
);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: ScrollablePositionedList.builder(
itemCount: contentCards.length,
initialScrollIndex: contentCards.indexOf(contentCards[50]),
itemBuilder: (context, index) {
return contentCards[index];
},
)
);
}
}
Expected behavior
VoiceOver focus should go to the item in initialScrollIndex (in this case item #50)
Actual behavior
VoiceOver focus jumps to an earlier item (item #26)
Environment
iPhone 12, iOS version 17.6.1
scrollable_test.mp4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels