Error: Either zero or 2 or more [DropdownMenuItem]s were detected with the same value I/flutter (18363): 'package:flutter/src/material/dropdown.dart':

后端 未结 10 1456
借酒劲吻你
借酒劲吻你 2021-01-17 13:07

Error code Hi I\'m new to flutter and have a question about dropdownbutton regarding using the same values for multiple dropdownbutton.

From my understanding from th

10条回答
  •  無奈伤痛
    2021-01-17 13:50

    _value1 and _value2 variables need to be initialized, or you can do that:

    value: _value1 != null ? _value1 : null,
    hint: Text('Your hint'),
    

提交回复
热议问题