import 'package:flutter/material.dart'; import '../config/color_palette.dart'; import 'dropdown_button_default.dart'; class DropdownWithSubtitle extends StatelessWidget { String subtitle; String hintDropdown; String? select; double widthSubtitle; double widthDropdown; double widthContainerDropdown; List list; var onChanged; Color colorBorder; DropdownWithSubtitle({ required this.subtitle, required this.select, required this.widthDropdown, required this.widthContainerDropdown, required this.widthSubtitle, required this.hintDropdown, required this.onChanged, required this.list, this.colorBorder = ColorPalette.black54, }); @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(vertical: 5.0), child: Column( children: [ // Container( // width: widthSubtitle, // height: 40, // padding: const EdgeInsets.all(8.0), // child: TextDefault( // text: subtitle, // color: ColorPalette.black54, // fontSize: 18, // fontWeigth: FontWeight.bold, // ), // ), Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), border: Border.all(color: colorBorder) ), margin: EdgeInsets.symmetric(horizontal: 5), padding: EdgeInsets.symmetric(horizontal: 2), child: DropDownButtonDefault( title: hintDropdown, fontSize: 15, width: widthDropdown, widthContainer: widthContainerDropdown, select: select, list: list, onChanged: onChanged, ), ), ], ), ); } }