This error is showing whenever i run my code and contact avatar is shown in the calling screen,otherwiss it works fine
ERROR ----> A RenderFlex overflowed by 243 pixels on the bottom.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size. This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
Widget build(BuildContext context) {
//var contectinfo=widget.contact;
var contactinfo=widget.contact!=null?widget.contact:new Contact();
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.red.shade700,
body: SafeArea(
child: Container(
color: Colors.red.shade700,
child: Padding(
padding: const EdgeInsets.all(0.0),
child: Card(
color: Colors.red.shade700,
child: Column(
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'CALLING',
style: new TextStyle(fontSize: 20.0),
),
)
],
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
contactinfo.displayName,
style: new TextStyle(fontSize: 20.0),
),
)
],
),
Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: (_avatar != null && _avatar.length > 0) ? CircleAvatar(
backgroundImage: MemoryImage(_avatar),
maxRadius: 80,
):
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.grey
),
child: CircleAvatar(
child: Text(
contactinfo.initials(),
style: TextStyle(
color: Colors.white,
fontSize: 60
)
),
backgroundColor: Colors.transparent,
maxRadius: 80
)
)
),
],
),
Padding(
padding:
const EdgeInsets.only(left: 30, right: 20, bottom: 20),
child: Container(
color: Colors.red.shade700,
margin: EdgeInsets.all(30),
child: Column(
children: <Widget>[
Row(
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn7",
child: Icon(
CupertinoIcons.mic_slash_fill,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn6",
child: Icon(
Icons.dialpad,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn5",
child: Icon(
Icons.volume_up_sharp,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
],
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn4",
child: Icon(
CupertinoIcons.add,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn3",
child: Icon(
CupertinoIcons.video_camera_solid,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
Padding(
padding: const EdgeInsets.all(20.0),
child: FloatingActionButton(
heroTag: "btn2",
child: Icon(
CupertinoIcons.person_add_solid,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: null),
),
],
)
],
),
),
),
Padding(
padding: const EdgeInsets.only(bottom: 30),
child: FloatingActionButton(
heroTag: "btn1",
child: Icon(
Icons.phone_disabled_rounded,
color: Colors.red.shade700,
),
backgroundColor: Colors.white,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ContactsScreen()),
);
},
),
),
],
),
),
),
),
),
));
}