dataSelector method
Widget
dataSelector(
- BuildContext context,
- String? title,
- String? headerTitle,
- dynamic onChange(), {
- bool loading = false,
- bool forceDark = false,
Implementation
Widget dataSelector(BuildContext context, String? title, String? headerTitle,
Function() onChange,
{bool loading = false, bool forceDark = false}) {
return GestureDetector(
onTap: onChange,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: DUI.spacing.lateralPaddingValue,
vertical: DUI.spacing.lateralPaddingValue / 2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(DUI.spacing.borderRadius),
),
width: double.infinity,
child: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
headerTitle != null
? DUI.text.xs(context, headerTitle,
color: forceDark ? DUI.color.smallTextDarkMode : null)
: SizedBox.shrink(),
DUI.text.regular(context, title ?? "",
bold: true,
color: forceDark ? DUI.color.textDarkMode : null),
],
)),
Icon(
Icons.keyboard_arrow_down_rounded,
size: 14.0,
color: forceDark ? DUI.color.textDarkMode : null,
),
],
),
),
);
}