I have a DropdownButton and below it an ElevatedButton.
I want the ElevatedButton to be active only if a value in the DropdownButton is selected.
The " .isEmpty ? null " in the onPressed parameter of ElevatedButton does not do the job (ElevatedButton is active even though there is no value selected in the DropdownButton).
How can this be done?