Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diminished Drawer Drag Area #203

Open
remotr opened this issue Jun 14, 2022 · 0 comments
Open

Diminished Drawer Drag Area #203

remotr opened this issue Jun 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@remotr
Copy link

remotr commented Jun 14, 2022

Version

2.4.1

Library

feedback

Flutter channel

stable

Flutter version

2.8.1

Platform

iOS

Details

  • Dragging from left to right to show a Drawer is more difficult when using the Feedback plugin because the dragging area is diminished.
  • You cannot start dragging outside of the screen area but you have to move your finger just a few pixel in to the screen area before you start dragging
  • Dragging to show a drawer should be performed the same way whether or not you are using the Feedback plugin

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

@remotr remotr added the bug Something isn't working label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant