skip to Main Content

enter image description here
I am Getting Error when I am using Row === A RenderFlex overflowed by 41 pixels on the right.

I am trying to add A Text inside AppBar in left side but I am not getting proper output it’s giving me error === A RenderFlex overflowed by 41 pixels on the right.

2

Answers


  1. By default, the value of AppBar. leadingWidth is 56.0

    Documentation of AppBar

    Do below changes in AppBar to increase width of leading widget

    AppBar(
    title: const Text('Contact'),
     leading: Placeholder(color: Colors.white),
     leadingWidth: 100,
    )
    
    Login or Signup to reply.
  2. use title property instead of leading

    AppBar(title: const Text('Contact')),

    if you need to align it center then you can just use centerTitle: true,

    commonly leading is used for adding icons for back button or drawer

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search