Primeiro commit no ramo main
This commit is contained in:
57
lib/componentes/dropdown_button_city.dart
Normal file
57
lib/componentes/dropdown_button_city.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
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
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user