yangyxd / flutter_picker

Flutter picker plugin
MIT License
696 stars 266 forks source link

Console Error on change value on picker #78

Open stoppiNeobiz opened 4 years ago

stoppiNeobiz commented 4 years ago

A SemanticsNode with action "increase" needs to be annotated with either both "value" and "decreasedValue" or neither 'package:flutter/src/semantics/semantics.dart': Failed assertion: line 1885 pos 7: '!_canPerformAction(SemanticsAction.decrease) || (_value == '') == (_decreasedValue == '')'

List<String> _genders = <String>['', 'Uomo', 'Donna'];
RaisedButton(
              child: Text('Picker Show Modal'),
              onPressed: () {
                showPickerModal(context);
              },
            ),
showPickerModal(BuildContext context) {
      new Picker(
        adapter: PickerDataAdapter<String>(pickerdata: _genders),
        changeToFirst: true,
        hideHeader: false,
        onConfirm: (Picker picker, List value) {
          print(value.toString());
          print(picker.adapter.text);
        }
      ).showModal(this.context); //_scaffoldKey.currentState);
    }
agetman-gh commented 3 years ago

same issue