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

Exception "The getter 'itemHeights' was called on null" when using AutoSizeText with DropdownButton #52

Open
migalv opened this issue Mar 10, 2020 · 0 comments

Comments

@migalv
Copy link

migalv commented Mar 10, 2020

Create an app with the following constraints:

  1. Have a DropdownButton where the DropdownMenuItems have as a child a AutoSizeText
  2. Add a Textfield somewhere

Steps to reproduce:

  1. Click on the Dropdown
  2. Click on the TextField

Exception:

════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following NoSuchMethodError was thrown during performLayout():
The getter 'itemHeights' was called on null.
Receiver: null
Tried calling: itemHeights

The relevant error-causing widget was: 
  MaterialApp file:///D:/Projects/AndroidStudioProjects/chaldea/lib/main.dart:20:12
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      _DropdownButtonState._handleTap.<anonymous closure> (package:flutter/src/material/dropdown.dart:1146:26)
#2      _RenderMenuItem.performLayout (package:flutter/src/material/dropdown.dart:617:5)
#3      RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
#4      RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant