Issue
i am using rflutter_alert plugin to handle alerts in my App using Flutter but i have an issue when I put listView for parameter content other widgets like Text work without issues
i am getting the following error
Exception caught by rendering library ═════════════════════════════════════════════════════ The following assertion was thrown during performLayout(): RenderViewport does not support returning intrinsic dimensions.
Expanded(
child: Card(
child: ListView.builder(
itemCount: content.length,
itemBuilder: (ctx, index) {
return ListTile(title: Text(content[index]["doctor_name"]),
onTap: (){
Alert(
context: context,
title: doctors[index]["doctor_name"],
content: ListView(children: <Widget>[
Text(doctors[index]["major"]),
Text(doctors[index]["hospital"]),
],)
).show();
},
);
}),
),
)
this is the pluing url rflutter_alert
could you please help in this issue ?
Solution
You could try and wrap it into container and set width/height
onTap: (){
Alert(
context: context,
title: doctors[index]["doctor_name"],
content: Container(
width: 100,
height: 100,
child: ListView(children: <Widget>[
Text(doctors[index]["major"]),
Text(doctors[index]["hospital"]),
],))
).show();
Answered By - Nuts Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.