import 'package:flutter/material.dart'; class MyRichText extends StatelessWidget { final String title; final String value; final bool isArabic; MyRichText(this.title,this.value,this.isArabic,{Key? key}) : super(key: key); @override Widget build(BuildContext context) { return RichText( maxLines: 1, text: TextSpan( text: title, style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: [ TextSpan( text: " $value", style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), ) ]), ); } }