commons icon indicating copy to clipboard operation
commons copied to clipboard

singleInputDialog - Value not working when set initially

Open mikthemonster opened this issue 3 years ago • 1 comments

Hi,

When I create a singleInputDialog and add a value, the value is not set in the textfield - it actually looks like the value is set in the textfield, bit it is being shown as a label or something "behind" the textfield. When I save the dialog the value is emplty unless I enter at new value in the textfield.

singleInputDialog( context, title: "Input Dialog", label: "Name", value: item.optionName, validator: (value) { print("Validator: $value"); return value.isEmpty ? "Required!" : null; }, positiveAction: (value) async { item.optionName = value; await updateOption(item); setState(() {}); print("Submit: $value"); }, negativeAction: () { print("negative action"); }, neutralAction: () { print("neutral action"); }, negativeText: "d", );

mikthemonster avatar Feb 08 '21 07:02 mikthemonster