Compare commits
No commits in common. "dc817797f3742cbf90aeafd4f83d0812158f9e05" and "f72f86d8aee612e9cdc48661efa4d5e112be0400" have entirely different histories.
dc817797f3
...
f72f86d8ae
@ -67,9 +67,7 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
||||
const SizedBox(width: constants.padding),
|
||||
DropdownButton<String>(
|
||||
value: _mountType,
|
||||
onChanged: (mountType) {
|
||||
_handleChange(mountType ?? '');
|
||||
},
|
||||
onChanged: (mountType) => _handleChange(mountType ?? ''),
|
||||
items:
|
||||
constants.providerTypeList
|
||||
.map<DropdownMenuItem<String>>((item) {
|
||||
@ -187,17 +185,8 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
||||
}
|
||||
|
||||
void _handleChange(String mountType) {
|
||||
if (_mountType == mountType) {
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
_mountType = mountType;
|
||||
_mountNameController.text =
|
||||
(mountType == 'Sia' && _mountNameController.text.isEmpty)
|
||||
? 'default'
|
||||
: '';
|
||||
|
||||
_mount =
|
||||
(_mountNameController.text.isEmpty)
|
||||
? null
|
||||
|
Loading…
x
Reference in New Issue
Block a user