未定义命名参数“装饰”。尝试将名称更正为现有命名参数的名称
Container(
alignment: Alignment.topCenter,
child: DropdownButton(
underline: SizedBox(),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(horizontal: 5),
border: OutlineInputBorder(),
hintText: 'Select Languge',
),
items: Language.getLanguages().map((Language lang) {
return DropdownMenuItem<Language>(
value: lang,
child: Text(lang.name),
);
}).toList(),
onChanged: (Language val) {
_selectedLanguage = val;
},
)
),