Diminished Drawer Drag Area
remotr opened this issue · 0 comments
remotr commented
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
- Create a simple project and use Feedback v. 2.4.1.
- Replace the code in main.dart with the code below.
- 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.
- Remove Feedback from the code and try dragging from left to right again to show the Drawer.
- 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