two static method

Widget two({
  1. String? left,
  2. String? middle,
  3. String? right,
  4. String? textOntap1 = '',
  5. String? textOntap2 = '',
  6. void onTap1()?,
  7. void onTap2()?,
  8. TextStyle? textStyle,
  9. TextStyle? tapStyle,
})

Implementation

static Widget two({
  String? left,
  String? middle,
  String? right,
  String? textOntap1 = '',
  String? textOntap2 = '',
  void Function()? onTap1,
  void Function()? onTap2,
  TextStyle? textStyle,
  TextStyle? tapStyle,
}) {
  textStyle ??= Get.textTheme.bodySmall;
  tapStyle ??= Get.textTheme.bodySmall;

  return Expanded(
    child: Text.rich(
      textAlign: TextAlign.left,
      TextSpan(children: [
        TextSpan(text: left, style: textStyle),
        WidgetSpan(
          child: XTap(
            onTap: onTap1,
            child: Text(textOntap1!, style: tapStyle),
          ),
        ),
        TextSpan(text: middle, style: textStyle),
        WidgetSpan(
          child: XTap(
            onTap: onTap2,
            child: Text(textOntap2!, style: tapStyle),
          ),
        ),
        TextSpan(text: right, style: textStyle),
      ]),
    ),
  );
}