Skip to content

Scrolling a scrollable widget with Switch Control on iOS is not very comfortable #37974

Description

@chunhtai

design doc: flutter.dev/go/ios-switch-controll-scrolling

Steps to Reproduce

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'List playground',
      home: TestPage(),
    );
  }
}

class TestPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _TestPageState();
}

class _TestPageState extends State<TestPage> {
  List<String> items = ['1', '2', '3', '4', '5'];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SizedBox(
          width: 300.4,
          height: 50.0,
          child: Directionality(
            textDirection: TextDirection.ltr,
            child: CustomScrollView(
              slivers: <Widget>[
                SliverFixedExtentList(
                  itemExtent: 22.2,
                  delegate: SliverChildBuilderDelegate(
                      (BuildContext context, int index) {
                      return TextWidget(
                        items[index],
                      );
                    },
                    childCount : items.length,
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
class TextWidget extends StatefulWidget {
  const TextWidget(this.data);
  final String data;


  @override
  TextWidgetState createState() => TextWidgetState();
}

class TextWidgetState extends State<TextWidget>{

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Text(widget.data);
  }
}
  1. turn on switch control
  2. try to select the text item

It should show the scroll options, but it only has tap.

Logs

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: qualityA truly polished experiencecustomer: googleVarious Google teamscustomer: money (g3)engineflutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.found in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions