rebelappstudio / accessibility_tools

MIT License
70 stars 4 forks source link

PageView with GestureDetector on scroll has Accessibility issue: tap area is too small #31

Closed andrewNeroznak closed 10 months ago

andrewNeroznak commented 1 year ago

How to reproduce: Use a PageView with any GestureDetector (InkWell, Button...) widget in its children.

`dart import 'package:accessibility_tools/accessibility_tools.dart'; import 'package:flutter/material.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 const MaterialApp( home: AccessibilityTools( checkFontOverflows: true, child: MyHomePage(), ), ); } }

class MyHomePage extends StatelessWidget { const MyHomePage({super.key});

@override Widget build(BuildContext context) { return Scaffold( body: PageView.builder( itemCount: 5, itemBuilder: (context, index) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Text('Swipe to next page'), const SizedBox(height: 20), ElevatedButton( onPressed: () {}, child: const Text('data'), ), ], ); }, )); } } `

aednlaxer commented 10 months ago

Fixed in #39 (released in v1.0.1)