40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
|
import 'package:rkm_educa_prof_app/modelos/modelo_periodo.dart';
|
|
class DropdownPeriodo extends StatelessWidget {
|
|
String titulo;
|
|
ModeloPeriodo? seleciona;
|
|
void Function(ModeloPeriodo?)? onChanged;
|
|
List<DropdownMenuItem<ModeloPeriodo>> itens;
|
|
double hightLine;
|
|
|
|
DropdownPeriodo({
|
|
required this.titulo,
|
|
required this.seleciona,
|
|
required this.itens,
|
|
required this.onChanged,
|
|
required this.hightLine,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: hightLine,
|
|
child: Row(
|
|
children: [
|
|
TextCustom(text: titulo,fontWeight: FontWeight.bold),
|
|
SizedBox(width: 10,),
|
|
DropdownButtonHideUnderline(
|
|
child: DropdownButton(
|
|
hint: TextCustom(text: 'SELECIONE',size: 12.0,),
|
|
value: seleciona,
|
|
items: itens,
|
|
onChanged: onChanged,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|