Open ahmeddarafat opened 12 months ago
The same issue with me
The following assertion was thrown during layout: A RenderFlex overflowed by 43 pixels on the bottom.
The relevant error-causing widget was: DotNavigationBar DotNavigationBar: The overflowing RenderFlex has an orientation of Axis.vertical. The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
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.
The specific RenderFlex in question is: RenderFlex#08d48 OVERFLOWING ... parentData: offset=Offset(16.0, 12.0) (can use size) ... constraints: BoxConstraints(w=379.4, h=56.0) ... size: Size(379.4, 56.0) ... direction: vertical ... mainAxisAlignment: start ... mainAxisSize: min ... crossAxisAlignment: center ... verticalDirection: down
Currently facing the same issue
BOTTOM OVERFLOWED BY 43 PIXELS
The following assertion was thrown during layout:
A RenderFlex overflowed by 43 pixels on the bottom.
The relevant error-causing widget was:
DotNavigationBar DotNavigationBar:
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
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.
Error disappear when I stop using Material3 for theming
any progress on the issue . i m also facing this error
Also facing the same issue using material 3
A temporary fix for this is adding marginR and paddingR to the NavigationBar like so:
DotNavigationBar(
marginR: const EdgeInsets.symmetric(vertical: 0, horizontal: 8),
paddingR: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
currentIndex: _currentIndex,
onTap: _handleIndexChanged,
dotIndicatorColor: Colors.black,
items: [
DotNavigationBarItem(
icon: Icon(Icons.home),
selectedColor: Colors.purple,
),
/// Likes
DotNavigationBarItem(
icon: Icon(Icons.favorite_border),
selectedColor: Colors.pink,
),
/// Search
DotNavigationBarItem(
icon: Icon(Icons.search),
selectedColor: Colors.orange,
),
/// Profile
DotNavigationBarItem(
icon: Icon(Icons.person),
selectedColor: Colors.teal,
),
],
),
A temporary fix for this is adding marginR and paddingR to the NavigationBar like so:
DotNavigationBar( marginR: const EdgeInsets.symmetric(vertical: 0, horizontal: 8), paddingR: const EdgeInsets.symmetric(vertical: 4, horizontal: 8), currentIndex: _currentIndex, onTap: _handleIndexChanged, dotIndicatorColor: Colors.black, items: [ DotNavigationBarItem( icon: Icon(Icons.home), selectedColor: Colors.purple, ), /// Likes DotNavigationBarItem( icon: Icon(Icons.favorite_border), selectedColor: Colors.pink, ), /// Search DotNavigationBarItem( icon: Icon(Icons.search), selectedColor: Colors.orange, ), /// Profile DotNavigationBarItem( icon: Icon(Icons.person), selectedColor: Colors.teal, ), ], ),
thanks man . love for you
same issue here
A temporary fix for this is adding marginR and paddingR to the NavigationBar like so:
DotNavigationBar( marginR: const EdgeInsets.symmetric(vertical: 0, horizontal: 8), paddingR: const EdgeInsets.symmetric(vertical: 4, horizontal: 8), currentIndex: _currentIndex, onTap: _handleIndexChanged, dotIndicatorColor: Colors.black, items: [ DotNavigationBarItem( icon: Icon(Icons.home), selectedColor: Colors.purple, ), /// Likes DotNavigationBarItem( icon: Icon(Icons.favorite_border), selectedColor: Colors.pink, ), /// Search DotNavigationBarItem( icon: Icon(Icons.search), selectedColor: Colors.orange, ), /// Profile DotNavigationBarItem( icon: Icon(Icons.person), selectedColor: Colors.teal, ), ], ),
thanks man . love for you
this is working
The navigation bar makes a size error when using material 3