Files
rkmmobile/lib/widgets/dropdown_with_subtitle.dart

71 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:rkm/widgets/text_default.dart';
import '../utils/color_palette.dart';
import '../utils/const_variable.dart';
import 'dropdown_button_default.dart';
import 'input_text.dart';
class DropdownWithSubtitle extends StatelessWidget {
String subtitle;
String hintDropdown;
String? select;
double widthSubtitle;
double widthDropdown;
double widthContainerDropdown;
List<String> 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,
),
),
],
),
);
}
}