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),
|
const SizedBox(width: constants.padding),
|
||||||
DropdownButton<String>(
|
DropdownButton<String>(
|
||||||
value: _mountType,
|
value: _mountType,
|
||||||
onChanged: (mountType) {
|
onChanged: (mountType) => _handleChange(mountType ?? ''),
|
||||||
_handleChange(mountType ?? '');
|
|
||||||
},
|
|
||||||
items:
|
items:
|
||||||
constants.providerTypeList
|
constants.providerTypeList
|
||||||
.map<DropdownMenuItem<String>>((item) {
|
.map<DropdownMenuItem<String>>((item) {
|
||||||
@ -187,17 +185,8 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleChange(String mountType) {
|
void _handleChange(String mountType) {
|
||||||
if (_mountType == mountType) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_mountType = mountType;
|
_mountType = mountType;
|
||||||
_mountNameController.text =
|
|
||||||
(mountType == 'Sia' && _mountNameController.text.isEmpty)
|
|
||||||
? 'default'
|
|
||||||
: '';
|
|
||||||
|
|
||||||
_mount =
|
_mount =
|
||||||
(_mountNameController.text.isEmpty)
|
(_mountNameController.text.isEmpty)
|
||||||
? null
|
? null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user