import 'package:flutter/material.dart'; import 'package:rkm_educa_prof_app/componentes/text_custom.dart'; import 'package:rkm_educa_prof_app/utils/cidades_db.dart'; import '../utils/cores.dart'; class DropDownButtonCity extends StatelessWidget { var onChanged; String? select; bool validator; String error; DropDownButtonCity({ required this.onChanged, required this.select, required this.error, required this.validator }); @override Widget build(BuildContext context) { double width = MediaQuery.of(context).size.width; return Column( children: [ Container( width: width, margin: EdgeInsets.symmetric(vertical: 5), padding: EdgeInsets.symmetric(vertical: 5), color:PaletaCores.cinzaInput, child: DropdownButtonHideUnderline( child: DropdownButton( hint: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: TextCustom(text: 'Cidade',size: 15.0), ), value: select, items: Cidades().listCidades.map((value) => DropdownMenuItem( value: value.cidadeFront, child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: TextCustom( text: value.cidadeFront, color: Colors.black54, ), ), ) ).toList(), onChanged:onChanged ), ), ), ], ); } }