Skip to content

[showDatePicker] RenderFlex overflow exception with orientation of Axis.vertical and setting the text size to smallest from device settings. #61334

Description

@crtingram

Steps to Reproduce

  1. Open _DatePickerDialog (via showDatePicker method).
  2. Click edit icon top Enter Date.
  3. Enter an invalid date (1/1/1) in this case.

This is only occurring on my iPhone 7 right now. Also despite what the doctor says I do have both dart and flutter plugins installed and up to date (another issues I will have to look into).

Expected results:

Expect to see error message "Out of Range", not overflow message in flutter.

Actual results:

See attached image.

image

Logs
   +1 ms] flutter: The following assertion was thrown during layout:
[        ] flutter: A RenderFlex overflowed by 4.9 pixels on the bottom.
[        ] flutter:
[        ] flutter: The relevant error-causing widget was:
[        ] flutter:   Theme
[        ] flutter:   file:///Users/cory.ingram/Documents/Development/accuro-mobile/lib/widgets/acc_calendar/acc_calendar.dart:402:18
[        ] flutter:
[        ] flutter: The overflowing RenderFlex has an orientation of Axis.vertical.
[        ] flutter: The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
[        ] flutter: black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
[        ] flutter: Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
[        ] flutter: RenderFlex to fit within the available space instead of being sized to their natural size.
[        ] flutter: This is considered an error condition because it indicates that there is content that cannot be
[        ] flutter: seen. If the content is legitimately bigger than the available space, consider clipping it with a
[        ] flutter: ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
[        ] flutter: like a ListView.
[        ] flutter: The specific RenderFlex in question is: RenderFlex#d5884 OVERFLOWING:
[        ] flutter:   needs compositing
[        ] flutter:   creator: Column ← ConstrainedBox ← Container ← LayoutBuilder ← OrientationBuilder ←
[        ] flutter:     InputDatePickerFormField ← _FormScope ← WillPopScope ← Form-[LabeledGlobalKey<FormState>#748fa] ←
[        ] flutter:     Expanded ← Column ← Builder ← ⋯
[        ] flutter:   parentData: <none> (can use size)
[        ] flutter:   constraints: BoxConstraints(w=291.2, h=66.2)
[        ] flutter:   size: Size(291.2, 66.2)
[        ] flutter:   direction: vertical
[        ] flutter:   mainAxisAlignment: start
[        ] flutter:   mainAxisSize: max
[        ] flutter:   crossAxisAlignment: center
[        ] flutter:   verticalDirection: down
[        ] flutter: ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
[        ] flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.14.6 18G103, locale en-CA)
    • Flutter version 1.17.5 at /Users/cory.ingram/Documents/Development/SDK/flutter
    • Framework revision 8af6b2f038 (12 days ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/cory.ingram/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2020.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] Connected device (3 available)
    • 9024O                        • de3d4e87                                 • android-arm • Android 7.1.1 (API 25)
    • Android SDK built for x86 64 • emulator-5554                            • android-x64 • Android 10 (API 29)
      (emulator)

Activity

  1. darshankawar commented on Jul 13, 2020

    @darshankawar
    Member

    Hi @crtingram,
    Please provide a minimal complete reproducible code sample that shows this issue. Can you also confirm if this happens on Android device ?

  2. added
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 13, 2020
  3. crtingram commented on Jul 13, 2020

    @crtingram
    Author

    @darshankawar Here is the a minimal complete reproducible code sample. I can confirm that this issue does not occur on my Android tablet, or any of the emulators that I have tried. Only on my iPhone 7.

    Code Sample
    
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Flutter Demo',
          debugShowCheckedModeBanner: false,
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      MyHomePage({Key key, this.title}) : super(key: key);
    
      final String title;
    
      @override
      _MyHomePageState createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      int _counter = 0;
    
      DateTime _fromDate = DateTime.now();
    
      Future<void> _showDatePicker() async {
        final picked = await showDatePicker(
          context: context,
          initialDate: _fromDate,
          firstDate: DateTime(2015, 1),
          lastDate: DateTime(2100),
        );
        if (picked != null && picked != _fromDate) {
          setState(() {
            _fromDate = picked;
          });
        }
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(
                  'You have pushed the button this many times:',
                ),
                Text(
                  '$_counter',
                  style: Theme.of(context).textTheme.headline4,
                ),
              ],
            ),
          ),
          floatingActionButton: FloatingActionButton(
            onPressed: _showDatePicker,
            tooltip: 'Increment',
            child: Icon(Icons.add),
          ),
        );
      }
    }
    
    
  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 13, 2020
  5. darshankawar commented on Jul 14, 2020

    @darshankawar
    Member

    May be Related to 55535, 19744 and 18672

  6. darshankawar commented on Jul 14, 2020

    @darshankawar
    Member

    Hi @crtingram,
    Since I don't have iPhone 7, I can't replicate the issue. I tried on iPhone 11 and 8 and don't see the overflow. Also tried on Samsung devices but didn't see the issue. May be it has to do with smaller screen devices.

  7. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    platform-iosiOS applications specifically
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed on Jul 14, 2020
  8. 26 remaining items

  9. flutter-triage-bot commented on Jul 11, 2024

    @flutter-triage-bot

    This issue is missing a priority label. Please set a priority label when adding the triaged-design label.

  10. added
    P2Important issues not at the top of the work list
    on Jul 11, 2024
  11. added a commit that references this issue on Jul 31, 2024
    91a3f69
  12. added
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 1, 2024
  13. added a commit that references this issue on Aug 7, 2024
    3144bb0
  14. github-actions commented on Aug 15, 2024

    @github-actions

    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.

  15. locked as resolved and limited conversation to collaborators on Aug 15, 2024
  16. added a commit that references this issue on Sep 2, 2024
    e38bb28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listf: date/time pickerDate or time picker widgetsfound in release: 3.22Found to occur in 3.22found in release: 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions