build method
현재 테마와 비활성 상태를 반영한 드롭다운을 빌드한다.
Implementation
@override
Widget build(BuildContext context) {
return Container(
padding: contentPadding ?? const EdgeInsets.symmetric(horizontal: 8.0, vertical: 10.0),
decoration:
decoration ??
BoxDecoration(
color: disabled ? DN.theme.gray[200] : backgroundColor ?? DN.theme.backgroundColor,
border: Border.all(color: DN.theme.dividerColor),
borderRadius: borderRadius ?? BorderRadius.circular(4.0),
),
child: DropdownButton(
style:
textStyle ??
TextStyle(
color: DN.theme.fontColor,
fontSize: DN.theme.fontSize,
fontWeight: FontWeight.normal,
fontFamily: DN.theme.data.fontFamily,
),
icon: icon ?? Icon(Icons.keyboard_arrow_down, size: 18.0),
isExpanded: true,
isDense: true,
underline: SizedBox(),
items: items,
value: value,
onChanged: disabled ? null : onChanged,
),
);
}