Container(
width: MediaQuery.of(context).size.width,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Column(
children: [
Container(
width: MediaQuery.of(context).size.width,
height: 50,
color: Color(0xff0B28BE),
child: ListView.builder(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: 1,
itemBuilder: (context, index) {
return Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 15,
),
Text(
"Pmnt. \nNo.".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Payment. \nDate.".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Beginning. \nBalance.".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Scheduled. \nPayment.".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Total. \nPayment.".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Principle".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Interest".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"Ending \nBalance".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.white),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
],
);
})),
Container(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 20),
width: MediaQuery.of(context).size.width,
height: 100,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemBuilder: (context,index){
return SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
child: Column(
children: [
SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 15,
),
Text(
"1".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"20/09/2021".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"1000000.00".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"20/04/2022".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
Text(
"1200000.00".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 30,
),
Text(
"4000.00".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 40,
),
Text(
"5".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 35,
),
Text(
"1600000.00".toUpperCase(),
style: TextStyle(
fontSize: 10, color: Colors.black),
textAlign: TextAlign.center,
),
SizedBox(
width: 15,
),
],
)
],
),
);
}),
),
],
),
),
)
// Container(
// child: SingleChildScrollView(
// scrollDirection: Axis.horizontal,
// child: Column(
// children: [
// SizedBox(height: 10,),
//
// ],
// ),
// ),
// )
],
),
),
)
-
You need to pretty-print that dumpout and mark it up as code if you want to have any hope that anyone will take a look. Check out stackoverflow.com/editing-help - maybe they have "your language" already under syntax highlighting or something similar to make it to do pretty-printing for you - worth a try– ZXXMay 21, 2022 at 12:58
Add a comment
|
1 Answer
you should wrap your listview.builders with Expanded widget
Here is sample code snippet :
Column(
children: [
Expanded(
child: ListView.builder(
padding: EdgeInsets.only(
top: AppBar().preferredSize.height +
MediaQuery.of(context).padding.top +
24,
bottom: 62 + MediaQuery.of(context).padding.bottom,
),
scrollDirection: Axis.vertical,
itemCount: list.length,
itemBuilder: (BuildContext context, int index) {
return ListItem(item: list[index]);
}),
),
Expanded(
child: ListView.builder(
padding: EdgeInsets.only(
top: AppBar().preferredSize.height +
MediaQuery.of(context).padding.top +
24,
bottom: 62 + MediaQuery.of(context).padding.bottom,
),
scrollDirection: Axis.vertical,
itemCount: list.length,
itemBuilder: (BuildContext context, int index) {
return ListItem(item: list[index]);
}),
),
],
);