itemHeader method

Widget itemHeader(
  1. BuildContext context,
  2. String text, {
  3. Function? onTap,
  4. String? onAccessoryButtonText,
  5. bool loading = false,
})

Implementation

Widget itemHeader(BuildContext context, String text,
    {Function? onTap, String? onAccessoryButtonText, bool loading = false}) {
  return Container(
    padding: EdgeInsets.only(top: 2 * DUI.spacing.lateralPaddingValue),
    child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Expanded(
          child: title3(context, text,
              color: Theme.of(context).textTheme.titleLarge!.color),
        ),
        onAccessoryButtonText == null
            ? SizedBox.shrink()
            : DUI.button.smallButton(context, onAccessoryButtonText, onTap,
                loading: loading)
      ],
    ),
  );
}