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

DatePicker dialog overflows on large screen #21383

Closed
Ch4rl3B opened this issue Sep 4, 2018 · 6 comments · Fixed by #31514
Closed

DatePicker dialog overflows on large screen #21383

Ch4rl3B opened this issue Sep 4, 2018 · 6 comments · Fixed by #31514
Assignees
Labels
f: date/time picker Date or time picker widgets f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Comments

@Ch4rl3B
Copy link

Ch4rl3B commented Sep 4, 2018

Hi, i have an issue with the datepicker dialog on a BLU STUDIO G2 with a large screen, the dialog bottom is overflowed by 39 pixels, so the "Accept" and "Cancel" button are inaccessible.

Steps to Reproduce

On my code:

My theme:

final ThemeData mainTheme = new ThemeData(
  brightness: Brightness.dark,
  primaryColor: Colors.white,
  accentColor: Colors.lightBlue,
  splashColor: Colors.lightBlue,
  textTheme: TextTheme(
    headline: TextStyle(color: Colors.black),
    subhead: TextStyle(color: Colors.white70),
    body1: TextStyle(color: Colors.white),
    caption: TextStyle(color: Colors.blue),
  ),
  primaryTextTheme: TextTheme(
    headline: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
    subhead: TextStyle(color: Colors.black54, fontStyle: FontStyle.italic),
    body1: TextStyle(color: Colors.black),
    body2: TextStyle(color: Colors.white),
    display2: TextStyle(color: Colors.black54),
    display3: TextStyle(color: Colors.black),
  ),
);

The DatePicker:

final DateTime picked = await showDatePicker(
        context: context,
        initialDate: selectedDate,
        firstDate: selectedDate,
        lastDate: new DateTime(2101)
    );

Logs

I/flutter (22738): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (22738): The following message was thrown during layout:
I/flutter (22738): A RenderFlex overflowed by 39 pixels on the bottom.
I/flutter (22738): The overflowing RenderFlex has an orientation of Axis.vertical.
I/flutter (22738): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
I/flutter (22738): black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
I/flutter (22738): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
I/flutter (22738): RenderFlex to fit within the available space instead of being sized to their natural size.
I/flutter (22738): This is considered an error condition because it indicates that there is content that cannot be
I/flutter (22738): seen. If the content is legitimately bigger than the available space, consider clipping it with a
I/flutter (22738): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
I/flutter (22738): like a ListView.
I/flutter (22738): The specific RenderFlex in question is:
I/flutter (22738):   RenderFlex#e5936 relayoutBoundary=up7 OVERFLOWING
I/flutter (22738):   creator: Column ← SizedBox ← LayoutBuilder ← OrientationBuilder ← DefaultTextStyle ←
I/flutter (22738):   AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#65434 ink renderer] ←
I/flutter (22738):   NotificationListener<LayoutChangedNotification> ← CustomPaint ← _ShapeBorderPaint ← PhysicalShape
I/flutter (22738):   ← _MaterialInterior ← ⋯
I/flutter (22738):   parentData: <none> (can use size)
I/flutter (22738):   constraints: BoxConstraints(w=240.0, 0.0<=h<=449.3)
I/flutter (22738):   size: Size(240.0, 449.3)
I/flutter (22738):   direction: vertical
I/flutter (22738):   mainAxisAlignment: start
I/flutter (22738):   mainAxisSize: min
I/flutter (22738):   crossAxisAlignment: stretch
I/flutter (22738):   verticalDirection: down
I/flutter (22738): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
I/flutter (22738): ════════════════════════════════════════════════════════════════════════════════════════════════════

Flutter Doctor

[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.15063], locale en-US)
   • Flutter version 0.5.1 at C:\flutter
   • Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
   • Engine revision 1ed25ca7b7
   • Dart version 2.0.0-dev.58.0.flutter-f981f09760
                                                                                                                                                                            [
!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
   • Android SDK at F:\sdk
   • Android NDK location not configured (optional; useful for native profiling support)
   • Platform android-27, build-tools 27.0.3
   • ANDROID_HOME = F:\sdk
   • Java binary at: C:\Program Files\JetBrains\Android Studio 3.0\jre\bin\java
   • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-736)                                                                                                 
   X Android license status unknown.
                                                                                                                                                                            [
√] Android Studio (version 3.0)
  • Android Studio at C:\Program Files\Android\Android Studio
  • Flutter plugin version 22.2.1
  • Dart plugin version 171.4424
  • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
                                                                                                                                                                           [√
[√] Android Studio (version 3.0)
   • Android Studio at C:\Program Files\JetBrains\Android Studio 3.0
   • Flutter plugin version 22.2.1
   • Dart plugin version 171.4424
   • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-736)
                                                                                                                                                                            [
!] IntelliJ IDEA Ultimate Edition (version 2017.2)
   • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.2                                                                                                            
   X Flutter plugin not installed; this adds Flutter specific functionality.                                                                                                
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] Connected devices
    ! No devices available

! Doctor found issues in 3 categories.

Pictures:

blu studio g2 version de android 6 0
device-2018-09-03-214820

@zoechi
Copy link
Contributor

zoechi commented Sep 4, 2018

Please add the output of flutter doctor -v.

@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: date/time picker Date or time picker widgets labels Sep 4, 2018
@zoechi zoechi added this to the Goals milestone Sep 4, 2018
@Ch4rl3B
Copy link
Author

Ch4rl3B commented Sep 4, 2018

@zoechi Done adding flutter doctor

@zoechi
Copy link
Contributor

zoechi commented Sep 4, 2018

Great, thanks!

#19744 is still open so I guess this is not fixed.
It is probably still worth a try if this happens in beta 0.6.0

Channel beta, v0.5.1,

is quite outdated.

@shinayser
Copy link

shinayser commented Mar 1, 2019

Just want to leave my contribution here: it also has overflow problems on the text. Check this text in Brazillian portuguese:

This first image show the text properly:
device-2019-03-01-154121

This second image shows the overflow:
device-2019-03-01-154140

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [versão 10.0.17763.316], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] IntelliJ IDEA Community Edition (version 2018.3)
[√] VS Code (version 1.30.1)
[√] Connected device (1 available)

• No issues found!

@bkayfitz-cara
Copy link

Still not fixed, but if you remove the explicit height in the _DatePickerHeader class, it goes way.
Just delete Line 161 in date_picker.dart
Its strange that this issue is happening, because when you debug the value, height is suppose to be null...

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: date/time picker Date or time picker widgets f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants