-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: crashStack traces logged to the consoleStack traces logged to the consoleengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specifically
Description
When using a PageView with VoiceOver turned on, and the children are wrapped by Semantic widgets that have explicitChildNodes set to true, scrolling causes a crash almost every time.
The following code reproduces this consistently after scrolling left and right:
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: SemanticsPageViewHomePage(),
);
}
}
class SemanticsPageViewHomePage extends StatefulWidget {
const SemanticsPageViewHomePage();
_SemanticsPageViewHomePageState createState() => _SemanticsPageViewHomePageState();
}
class _SemanticsPageViewHomePageState extends State<SemanticsPageViewHomePage> {
List<Widget> _children = [];
Widget _buildPage() {
return Semantics(
explicitChildNodes: true,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text("test 1"),
Text("test 2")
],
),
),
);
}
void _buildChildren() {
_children.clear();
_children.add(_buildPage());
_children.add(_buildPage());
_children.add(_buildPage());
}
@override
void initState() {
_buildChildren();
super.initState();
}
@override
void didUpdateWidget(SemanticsPageViewHomePage oldWidget) {
_buildChildren();
super.didUpdateWidget(oldWidget);
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
child: PageView(
children: _children,
),
),
Container(
color: Colors.red,
height: 60
)
],
)
);
}
}
I am testing on an iPhone 6 running iOS 12.
Metadata
Metadata
Assignees
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: crashStack traces logged to the consoleStack traces logged to the consoleengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specifically