Created
June 30, 2020 11:16
-
-
Save AyushBherwani1998/56e98693717029939535c7892a07fd5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ISSUE: #50400 | |
| // If you run this code, you won't encounter the issue. It has a drawer and a Scaffold as mentioned. Hovering over the | |
| // back button, places the tooltip at the expected position. However, the person has given reproducible code due to which I was | |
| // able to reproduce the error. And the error is not because of Drawer, it because of the Navigator being inside the Row. If you remove | |
| // the drawer and have a container, the tooltip move it's place. One more finding, it will move it's place to the right which is | |
| // equivalent to the width of other widget in the Row. The person code is given in the issue which you can try out. Also, the issue is | |
| // producible on the Android too. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MaterialApp( | |
| routes: { | |
| '/': (context) => MyApp(), | |
| '/nextPage': (context) => NextPage(), | |
| }, | |
| )); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Row( | |
| children: [ | |
| Drawer(), | |
| Expanded( | |
| child: Scaffold( | |
| appBar: AppBar( | |
| title: Text('MyApp'), | |
| ), | |
| body: Center( | |
| child: RaisedButton( | |
| onPressed: () => Navigator.pushNamed(context, '/nextPage'), | |
| child: Text('Tap Me!'), | |
| ), | |
| ), | |
| ), | |
| ) | |
| ], | |
| ); | |
| } | |
| } | |
| class NextPage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Row( | |
| children: [ | |
| Drawer(), | |
| Expanded( | |
| child: Scaffold( | |
| appBar: AppBar( | |
| title: Text('Next Page Title'), | |
| ), | |
| body: Center( | |
| child: Text("Next Page"), | |
| ), | |
| ), | |
| ) | |
| ], | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
flutter/flutter#50400