66 lines
2.0 KiB
Dart
66 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/widgets/text_default.dart';
|
|
import '../config/color_palette.dart';
|
|
import '../config/const_variable.dart';
|
|
import '../models/equipe_modelo.dart';
|
|
|
|
class DropDownEquipe extends StatelessWidget {
|
|
var onChanged;
|
|
EquipeModelo? select;
|
|
String title;
|
|
double fontSize;
|
|
List<EquipeModelo> list;
|
|
double width;
|
|
double widthContainer;
|
|
|
|
DropDownEquipe({
|
|
required this.onChanged,
|
|
required this.select,
|
|
required this.title,
|
|
required this.list,
|
|
required this.width,
|
|
this.fontSize = 15,
|
|
this.widthContainer = 300
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
children: [
|
|
Container(
|
|
width: width*0.95,
|
|
margin: ConstVariable().marginHightInput,
|
|
color: ColorPalette.white,
|
|
child: DropdownButtonHideUnderline(
|
|
child: DropdownButton(
|
|
hint: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 0.0),
|
|
child: TextDefault(text: title,fontSize: ConstVariable().fontSizeInput,textAlign: TextAlign.end,color: Colors.black,),
|
|
),
|
|
value: select,
|
|
items: list.map((value) => DropdownMenuItem<EquipeModelo>(
|
|
value: value,
|
|
child: Container(
|
|
width: widthContainer,
|
|
child: Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 0.0),
|
|
child: TextDefault(
|
|
text: 'INE: ${value.INE} / Área: ${value.AREA} ${value.MICROAREA==null?'':'- Microárea : ${value.MICROAREA}'}',
|
|
maxLines: 2,
|
|
fontSize: fontSize,
|
|
color: Colors.black,
|
|
),
|
|
),
|
|
),
|
|
)
|
|
).toList(),
|
|
onChanged:onChanged
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|