Skip to content

GridView doesn't make the cell fully visible when swiping right  #36307

@mehmetf

Description

@mehmetf

Internal: b/137624348
Related: #61624 for iOS issues.

When using a GridView, and turning TalkBack on, swiping right doesn't make the full grid cell visible if it is already partly visible. Scrolling beyond the list does make future rows visible.

Screenshot attached.

Full repro code appended.

Steps:
Turn on TalkBack, then launch the app. Swipe right, and you'll see that the lowest row of cells isn't brought fully into view when they're highlighted.

import 'package:flutter/material.dart';

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

class MyApp extends StatefulWidget {
  @override
  State createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool useSemanticsDebugger = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        showSemanticsDebugger: useSemanticsDebugger,
        theme: ThemeData(primaryColor: Colors.blue),
        home: Scaffold(
          appBar: AppBar(
            title: Text('GridView Semantics Test'),
          ),
          body: GridView.count(crossAxisCount: 4,
              children: _buildChildren(context)
          ),
        ));
  }

  List<Widget> _buildChildren(BuildContext context) {
    final widgets = List<Widget>();
    for(int i = 0; i < 100; ++i) {
      widgets.add(ListTile(
        title: Text('Cell $i'),
      ));
    }
    return widgets;
  }
}

image

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: qualityA truly polished experiencecustomer: money (g3)f: scrollingViewports, list views, slivers, etc.found in release: 1.12Found to occur in 1.12found in release: 1.17Found to occur in 1.17found in release: 1.18Occurs in 1.18frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions