ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
392 stars 94 forks source link

Diminished Drawer Drag Area #203

Open remotr opened 2 years ago

remotr commented 2 years ago

Version

2.4.1

Library

feedback

Flutter channel

stable

Flutter version

2.8.1

Platform

iOS

Details

Steps to reproduce

  1. Create a simple project and use Feedback v. 2.4.1.
  2. Replace the code in main.dart with the code below.
  3. Using a simulator you will notice that dragging from left to right does not seem to begin unless you begin the drag with the mousepointer positioned a few pixels inside the screen area.
  4. Remove Feedback from the code and try dragging from left to right again to show the Drawer.
  5. You will notice that it is much easier now to start dragging from left to right to show the Drawer.

Code for main.dart:

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

void main() {
  runApp(
    const BetterFeedback(
      child: MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final GlobalKey<ScaffoldState>? scaffoldKey = GlobalKey<ScaffoldState>();

  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      drawer: Drawer(
        key: scaffoldKey,
        child: ListView(
          padding: EdgeInsets.zero,
          children: <Widget>[
            const DrawerHeader(
              child: Text('Drawer Header'),
              decoration: BoxDecoration(
                color: Colors.blue,
              ),
            ),
            ListTile(
              title: const Text('Item 1'),
              onTap: () {},
            )
          ],
        ),
      ),
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}

Output of flutter doctor -v

No response