altComponentLabel method

Widget altComponentLabel({
  1. required dynamic component,
  2. required String? label,
})

Implementation

Widget altComponentLabel({required var component, required String? label}) {
  return Padding(
    padding: const EdgeInsets.only(bottom: componentLabelSpacing),
    child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Text(
            (capitalizeFirstofEach(text: label ?? "label")) +
                (component["security"] != null
                    ? ((component["security"]["required"]) == true
                        ? " *"
                        : "")
                    : ""),
            style: componentLabelStyle),
        altComponentHelpText(component: component)
      ],
    ),
  );
}