Issue
Hi good evening everyone. I am trying to use expanded in my rich text but unable to achieve. My main problem is that widget get overflow on different screen size so I need a way of how to achieve expanded since expanded will help text to fit according to sizer of the screen
code :
Container(
width: double.maxFinite,
height: 100,
margin: const EdgeInsets.only(left: 150,top: 50),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Watch your playlist",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: color.AppColor.homePageDetails
),
),
SizedBox(height: 10,),//56:39
RichText(
text: TextSpan(
text: "stream up\n",
style:TextStyle(
color: color.AppColor.homePagePlanColor,
fontSize: 16
),
children: [
TextSpan(
text:"check out your favourite"
)
]
),
),
],
),
)
Solution
Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: RichText(
text: TextSpan(
worked for me
Answered By - Kartikeya Tiwari Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.