The following assertion was thrown during layout: A RenderFlex overflowed by 71 pixels on the right - flutter

======== Exception caught by rendering library =====================================================
The following assertion was thrown during layout:
A RenderFlex overflowed by 71 pixels on the right.
The relevant error-causing widget was:
Row Row:file:///Users/ddo/Desktop/projects/yedek/deneme_kaynak/lib/views/screens/category/screens/first_screen.dart:82:40
The overflowing RenderFlex has an orientation of Axis.horizontal.
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#37132 relayoutBoundary=up13 OVERFLOWING
... parentData: offset=Offset(12.0, 20.0) (can use size)
... constraints: BoxConstraints(w=134.6, 0.0<=h<=Infinity)
... size: Size(134.6, 36.0)
... direction: horizontal
... mainAxisAlignment: center
... mainAxisSize: max
... crossAxisAlignment: center
... textDirection: ltr
... verticalDirection: down
◢◤◢◤◢◤
Widget build(BuildContext context) {
List<Category> childs = widget.snapshot.data.allCategories
.where((element) => element.parentId == widget.id)
.toList();
return Positioned(
left: MediaQuery.of(context).size.width * .2,
child: Container(
width: MediaQuery.of(context).size.width * .8,
height: MediaQuery.of(context).size.height,
child: Column(
children: [
childs.length != 0
? Container(
width: MediaQuery.of(context).size.width * .8,
height: MediaQuery.of(context).size.height,
child: MasonryGridView.count(
cacheExtent: 4,
padding: EdgeInsets.fromLTRB(0, 0, 0, 250),
crossAxisCount: 2,
//mainAxisSpacing: 2,
//crossAxisSpacing: 2,
itemCount: childs.length + 1,
itemBuilder: (context, int) => int == 0
? Card(
margin: EdgeInsets.fromLTRB(3, 3, 3, 1),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
gradientFrom[3],
gradientTo[3],
])),
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 20, horizontal: 12),
/*
> > > > > ROW < < < < <
//first_screen.dart:82:40 Row
*/
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
/*Padding(
padding:
const EdgeInsets.all(0.0),
child: Image.asset(
"assets/images/welding.png",
width: MediaQuery.of(context)
.size
.width *
.14,
),
),*/
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
width: MediaQuery.of(context).size.width * .5,
child: Text(widget.category,
textScaleFactor: 1,
overflow: TextOverflow.clip,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 15.0)),
),
/* Text('see_all'.tr(),textScaleFactor: 1,
style: TextStyle(
color: Colors.white70,
fontSize: 10)),*/
],
),
/* Icon(
Icons.chevron_right,
color: Colors.white,
)*/
]),
),
),
)
: Column(
children: [
int == 1 ? SizedBox(height: 75,): SizedBox(),
InkWell(
onTap: () {
gotoSuborProd(widget.snapshot, int, childs);
},
child: Card(
margin: EdgeInsets.fromLTRB(3, 2, 3, 2),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
border:
Border.all(color: gradientFrom1[int % 5], width: 5)
/*gradient: LinearGradient(colors: [
gradientFrom[int % 5],
gradientTo[int % 5],
])*/
),
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 20, horizontal: 3),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
imageGet(Uri.encodeComponent(
childs[int - 1].imageUrl ?? "")),
Padding(padding: EdgeInsets.only(bottom: 16.0)),
Text(childs[int - 1].category,
textScaleFactor: 1,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w700,
fontSize: 14.0)),
/*Text(
childs[int-1].seoTitle.toString(),textScaleFactor: 1,
style: TextStyle(
color: Colors.white70,
fontSize: 12.0)),*/
]),
),
),
),
),
],
)
// ignore: missing_return
),
)
: Container(),
],
),
));
}

Wrap your Column with Expanded widget, this will solve BoxConstraints(w=134.6, 0.0<=h<=Infinity
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 20, horizontal: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded( //here
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [

move your title Widget to top of the Column like shown in screenshot:

Related

RenderFlex children have non-zero flex but incoming width constraints are unbounded - Flutter

I'm trying to show cart items horizontally using listview builder but it is throwing up following error
RenderFlex children have non-zero flex but incoming width constraints are unbounded (When a row is in a parent that does not provide a finite width constraint, for example if it is in a horizontal scrollable, it will try to shrink-wrap its children along the horizontal axis. Setting a flex on a child (e.g. using Expanded) indicates that the child is to expand to fill the remaining space in the horizontal direction.)
I already wrapped the list view builder with defined height but still throwing up the error
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('MY CART', style: GoogleFonts.oswald(color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.w400)),
const SizedBox(height: 20.0),
SizedBox(
height: 180.0,
width: double.infinity,
child: ListView.builder(
itemCount: 2,
scrollDirection: Axis.horizontal,
itemBuilder: (context, index){
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 150.0,
width: 150.0,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/dress.jpg')
),
borderRadius: BorderRadius.all(Radius.circular(15.0))
),
),
const SizedBox(width: 10.0),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('PRODUCT TITLE',
style: GoogleFonts.oswald(
textStyle: const TextStyle(
color: Colors.black,
fontSize: 14.0)), overflow: TextOverflow.visible,),
const SizedBox(height: 5.0),
Text('SIZE: M',
style: GoogleFonts.oswald(
textStyle: const TextStyle(
color: Colors.black45,
fontSize: 16.0))),
const SizedBox(height: 10.0),
Text('10 DOLLARS',
style: GoogleFonts.oswald(
textStyle: const TextStyle(
color: Colors.black,
fontSize: 16.0))),
],
),
)
],
);
},
),
),
],
)
This was happened because you use expanded in row inside horizontal listview, you have two option :
One: remove the expanded widget inside Row inside itemBuilder.
Two: set width for item inside itemBuilder:
itemBuilder: (context, index){
return SizedBox(
width: 400.0, // <--- add this
child: return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 150.0,
...
);
}

responsive design resize problem - flutter

Widget myPost(double screenH, BuildContext context, double screenW) {
String sampleSrc =
"https://images.unsplash.com/photo-1475924156734-496f6cac6ec1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80";
return Container(
margin: const EdgeInsets.symmetric(vertical: 10),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
constraints: BoxConstraints(minWidth: screenW * 0.1),
height: screenH * 0.1,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
const CircleAvatar(
radius: 30,
),
SizedBox(
width: screenW * 0.01,
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"QWE QWE",
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"27 min",
),
const Icon(
Icons.enhanced_encryption_sharp,
size: 12,
),
],
),
],
),
],
),
const Icon(Icons.more_vert_sharp),
]),
),
),
ReadMoreText(
"text" * 800,
trimCollapsedText: "Read More...",
trimExpandedText: "Read less",
trimLines: 3,
style: const TextStyle(fontSize: 20),
trimMode: TrimMode.Line,
moreStyle: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
lessStyle: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
InkWell(
onTap: () {},
child: Container(
constraints: BoxConstraints.loose(Size.fromHeight(screenH * 0.5)),
child: Image.network(
sampleSrc,
fit: BoxFit.fitWidth,
width: double.infinity,
),
),
),
],
),
);
}
My design
I'm using the responsive_framework package, but when I reduce the height, all the widgets resizing, and I get overflows. The design I'm trying to make is like the following GIF the design that I want
Just like in responsive sites, I want the widgets to be fixed and only scrollable, no matter how much the height decreases.
Any trick or document to do this ?
The overall height on shrink is greater than height: screenH * 0.1, you can include extra pixels like height: 10+ (screenH * 0.1) But you can just include fixed height here. Like on item, you can choose minimum fixed height like 64, and you don't to have to worry about making larger. You can also check your attached GIF row height doesn't change.
Second option is wrapping Text with FittedBox widget, or using auto_size_text.

How do I fix 'RenderFlex overflowed by 283 pixels on the bottom' in flutter?

The error occurs in a screen where I am trying to render a list of contributions. I have tried a number of things (listed below), none of which works.
Wrapping my column widget with Expanded()
Wrapping my Column widget with Flexible()
Wrapping my Listview.builder() with SingleScrollView() then adding physics: NeverScrollableScrollPhysics() in it.enter image description here
I have a contributions screen with contains a Lisview.builder()
This is my contributions screen
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('My Chamas'),
centerTitle: true,
),
floatingActionButton: CustomFloatingActionButton(
buttonLabel: 'Contribute +',
),
resizeToAvoidBottomInset: false,
body: Column(
children: <Widget>[
Container(
height: MediaQuery.of(context).size.height * 0.22,
margin: EdgeInsets.only(top: 20),
child: PageView.builder(
itemCount: widget.availableChamas.length, // number of cards
controller: PageController(viewportFraction: 0.8),
onPageChanged: (int index) => setState(() => _index = index),
/*** Begin snapping chama cards */
itemBuilder: (_, i) {
return Transform.scale(
scale: i == _index ? 1 : 0.9,
child: Card(
elevation: 6,
margin: EdgeInsets.only(right: 0),
color: Theme.of(context).primaryColor, // Card backgound color
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
gradient: LinearGradient(
begin: Alignment.topRight,
end: Alignment.bottomLeft,
stops: [0.1, 0.9],
colors: [Colors.indigo, Colors.teal],
),
),
child: ChamaCard(
id: widget.availableChamas[i].id,
name: widget.availableChamas[i].name,
totalMembers: widget.availableChamas[i].totalMembers,
totalContributions: widget.availableChamas[i].totalContributions,
),
),
),
);
/*** End snapping chama cards */
},
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(right: 15, left: 15),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
'All my chamas',
style: TextStyle(fontSize: 15, color: Colors.red[900]),
),
Icon(
Icons.arrow_forward,
size: 17,
color: Colors.red[900],
)
],
),
SizedBox(height: 15),
Row(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('My', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20)),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(
'Contributions',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
),
SizedBox(width: 5),
Text(
'to this chama',
style: TextStyle(color: Colors.green[800]),
)
],
),
],
)
],
),
SizedBox(height: 10),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return ChamaListItem(
id: widget.availableContributions[index].id,
amount: widget.availableContributions[index].amount,
contributionDate: widget.availableContributions[index].contributionDate,
);
},
itemCount: widget.availableContributions.length,
),
],
),
)
],
),
);
}
This is my ChamaListItem widget which simply holds a single contribution card. This is what I am iterating to build a scrollable list in my Listview.builder()
Widget build(BuildContext context) {
return Card(
elevation: 4,
shadowColor: Color.fromRGBO(255, 255, 255, 0.5),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Date',
style: TextStyle(fontWeight: FontWeight.bold),
),
SizedBox(height: 5),
Text(
'$contributionDate',
style: TextStyle(color: Colors.red[900]),
)
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text('Kes'),
SizedBox(width: 1),
Text(
'$amount',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),
),
],
)
],
),
),
);
}
This is the error thrown in the console
Performing hot reload...
Syncing files to device sdk gphone x86 arm...
Reloaded 5 of 566 libraries in 1,183ms.
======== Exception caught by rendering library =====================================================
The following assertion was thrown during layout:
A RenderFlex overflowed by 283 pixels on the bottom.
The relevant error-causing widget was:
Column file:///Users/Steve/StudioProjects/m_chama/lib/screens/myChamas.dart:35:13
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#3a382 relayoutBoundary=up1 OVERFLOWING
... needs compositing
... parentData: offset=Offset(0.0, 105.5); id=_ScaffoldSlot.body (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=697.5)
... size: Size(392.7, 697.5)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: max
... crossAxisAlignment: center
... verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
====================================================================================================
Wrap Column widget with SingleChiledScrollView

Flutter bottom Overflow

Can anyone help me with this exception that I keep running into? I am not sure what attempt next in order to fix the overflow as the panel expands. I've tried wrapping it into a flexible widget but that doesn't seem to fix the issue.
Here is my exception:
════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 68 pixels on the bottom.
The relevant error-causing widget was:
Column file:///Users/selorm/AndroidStudioProjects/flutter_master/lib/src/widgets/weather_widget.dart:17:14
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#8829e relayoutBoundary=up1 OVERFLOWING
... needs compositing
... parentData: offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=410.6)
... size: Size(411.4, 410.6)
... direction: vertical
... mainAxisAlignment: center
... mainAxisSize: max
... crossAxisAlignment: center
... verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════
Here is my code:
#override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Flexible(
//flex: 2,
//fit: FlexFit.loose,
child: Text(
this.weather.cityName.toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.w900,
letterSpacing: 5,
color: AppStateContainer.of(context).theme.accentColor,
fontSize: 25),
),
),
SizedBox(
height: 20,
),
Flexible(
//flex: 1,
child:Text(
this.weather.description.toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.w100,
letterSpacing: 5,
fontSize: 20,
color: AppStateContainer.of(context).theme.accentColor),
),
),
WeatherSwipePager(weather: weather),
Padding(
child: Divider(
color:
AppStateContainer.of(context).theme.accentColor.withAlpha(50),
),
padding: EdgeInsets.all(10),
),
ForecastHorizontal(weathers: weather.forecast),
Padding(
child: Divider(
color:
AppStateContainer.of(context).theme.accentColor.withAlpha(50),
),
padding: EdgeInsets.all(10),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ValueTile("wind speed", '${this.weather.windSpeed} m/s'),
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Center(
child: Container(
width: 1,
height: 30,
color: AppStateContainer.of(context)
.theme
.accentColor
.withAlpha(50),
)),
),
ValueTile(
"sunrise",
DateFormat('h:m a').format(DateTime.fromMillisecondsSinceEpoch(
this.weather.sunrise * 1000))),
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Center(
child: Container(
width: 1,
height: 30,
color: AppStateContainer.of(context)
.theme
.accentColor
.withAlpha(50),
)),
),
ValueTile(
"sunset",
DateFormat('h:m a').format(DateTime.fromMillisecondsSinceEpoch(
this.weather.sunset * 1000))),
Padding(
padding: const EdgeInsets.only(left: 15, right: 15),
child: Center(
child: Container(
width: 1,
height: 30,
color: AppStateContainer.of(context)
.theme
.accentColor
.withAlpha(50),
)),
),
ValueTile("humidity", '${this.weather.humidity}%'),
]
),
],
),
);
}
}
You have to two quick options:
use ListView() with shrinkWrap set to true
#override
Widget build(BuildContext context) {
return ListView(
shrinkWrap: true,
children: <Widget>[
// Children
],
);
}
wrap Column() with singleChildScrollView()
#override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
// Children
],
),
);
}
That's it

How to render a specific number of lines for Wrap in Flutter?

I am trying to make a filter for a list in flutter. I wish to show a few of the filters above the list. Something like this -
(source: imge.to)
I can not figure out how to render only 2 lines of these filters and then render a chip with "+X" letting the user know how many more filters are also applied. So I am stuck with something like this -
(source: imge.to)
Code for how I am generating this 'filter glance' widget -
class FilterGlance extends StatelessWidget {
#override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(10.0, 10.0, 5, 0),
child: Text("FILTER",
style: TextStyle(
color: Colors.white30, fontWeight: FontWeight.bold)),
),
Container(
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
verticalDirection: VerticalDirection.down,
runSpacing: 3.0,
spacing: 3.0,
children: <Widget>[
ChipDesign("Lifetime"),
ChipDesign("Student"),
ChipDesign("Salaried"),
ChipDesign("Corporate"),
ChipDesign("Open"),
ChipDesign("My Referral Code Users"),
ChipDesign("+10"),
],
),
),
],
);
}
}
class ChipDesign extends StatelessWidget{
final String _label;
ChipDesign(this._label);
#override
Widget build(BuildContext context){
return Container(
child: Chip(
label: Text(
_label,
style: TextStyle(color: Colors.white),
),
backgroundColor: ColorDarkFG,
padding: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
),
margin: EdgeInsets.only(left: 10, right: 3, top: 0, bottom: 0),
);
}
}
I need only 2 lines of filters and then a chip with "+X" letting the user know how many more filters are present. The current code will keep on adding lines as I add more chips/filters.
There is no option like that may be for now you should go with this.
I have added BoxConstraints with SingleChildScrollView to your Wrap.
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(10.0, 10.0, 5, 0),
child: Text("FILTER",
style: TextStyle(
color: Colors.white30, fontWeight: FontWeight.bold)),
),
Container(
constraints: BoxConstraints(minHeight: 100, maxHeight: 100),
child: SingleChildScrollView(
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
verticalDirection: VerticalDirection.down,
runSpacing: 3.0,
spacing: 3.0,
children: <Widget>[
ChipDesign("Lifetime"),
ChipDesign("Student"),
ChipDesign("Salaried"),
ChipDesign("Corporate"),
ChipDesign("Open1"),
ChipDesign("Open2"),
ChipDesign("Open2"),
ChipDesign("Open4"),
ChipDesign("Open5"),
ChipDesign("Open6"),
ChipDesign("Open7"),
ChipDesign("Open9"),
ChipDesign("Open10"),
ChipDesign("Open11"),
ChipDesign("Open12"),
ChipDesign("My Referral Code Users"),
ChipDesign("+10"),
],
),
),
),
],
);
this resolve my problem
https://pub.dev/packages/extended_wrap
ExtendsWrap(
maxLines: 2,
children: [....]
)