one static method

Widget one({
  1. String? left,
  2. String? right,
  3. String? textOnTap = '',
  4. TextStyle? textStyle,
  5. TextStyle? tapStyle,
  6. void onTap()?,
})

Implementation

static Widget one({
  String? left,
  String? right,
  String? textOnTap = '',
  TextStyle? textStyle,
  TextStyle? tapStyle,
  void Function()? onTap,
}) {
  textStyle ??= Get.textTheme.bodySmall;
  tapStyle ??= Get.textTheme.bodySmall;

  return Expanded(
    child: Text.rich(
      textAlign: TextAlign.left,
      TextSpan(children: [
        TextSpan(text: left, style: textStyle ?? Get.textTheme.bodySmall),
        WidgetSpan(
          child: XTap(
            onTap: onTap,
            child: Text(textOnTap!, style: tapStyle),
          ),
        ),
        TextSpan(text: right, style: textStyle),
      ]),
    ),
  );
}