flutter - scrolling listview inside listview builder











up vote
0
down vote

favorite












I have a 'Filter' and below that is a list of soccer matches. I Wrap 'Filter and' listview builder' with a ListView (so that the overload writing under blablabla is resolved). But there is something strange when you scroll normally. scroll to the list that doesn't work. there is only a 'glow effect', but I scroll from the 'Filter menu' above, the scroll works. How do I make the scroll run normally?



see image



My snipped code:



Widget _buildListView(FixtureModel model, BuildContext context) {
return Container(
child: model.getFixturesCount() == 0
? Center(child: Text('No fixtures found'))
: ListView(
shrinkWrap: true,
children: <Widget>[
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 10.0),
child: InkWell(
onTap: () => _onTap(context),
child: Container(
margin:
EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5.0),
child:
Icon(FontAwesomeIcons.github)),
Container(
padding: EdgeInsets.only(left: 15.0),
child: Text(
'Liga Premier Inggris',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500),
),
),
Container(
padding: EdgeInsets.only(
left: 5.0, top: 2.0),
child: Icon(Icons.arrow_drop_down,
size: 17.0))
],
)),
)),
Container(
padding: EdgeInsets.only(top: 3.0),
child: Text(
'4',
style:
TextStyle(fontSize: 13.0, color: Colors.grey),
),
),
IconButton(
iconSize: 20.0,
icon: Icon(
FontAwesomeIcons.calendarAlt,
color: Colors.blue,
),
onPressed: () {})
],
),
Divider(
height: 0.0,
),
Container(
padding: EdgeInsets.only(top: 2.0),
child: ListView.builder(
shrinkWrap: true,
itemCount: model.fixtureList == null
? 0
: model.getFixturesCount(),
itemBuilder: (context, int i) {
var fixture = model.fixtureList[i];

return FixtureListItem(fixture: fixture);
},
))
],
)
],
));
}









share|improve this question






















  • In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
    – anmol.majhail
    Nov 5 at 5:17















up vote
0
down vote

favorite












I have a 'Filter' and below that is a list of soccer matches. I Wrap 'Filter and' listview builder' with a ListView (so that the overload writing under blablabla is resolved). But there is something strange when you scroll normally. scroll to the list that doesn't work. there is only a 'glow effect', but I scroll from the 'Filter menu' above, the scroll works. How do I make the scroll run normally?



see image



My snipped code:



Widget _buildListView(FixtureModel model, BuildContext context) {
return Container(
child: model.getFixturesCount() == 0
? Center(child: Text('No fixtures found'))
: ListView(
shrinkWrap: true,
children: <Widget>[
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 10.0),
child: InkWell(
onTap: () => _onTap(context),
child: Container(
margin:
EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5.0),
child:
Icon(FontAwesomeIcons.github)),
Container(
padding: EdgeInsets.only(left: 15.0),
child: Text(
'Liga Premier Inggris',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500),
),
),
Container(
padding: EdgeInsets.only(
left: 5.0, top: 2.0),
child: Icon(Icons.arrow_drop_down,
size: 17.0))
],
)),
)),
Container(
padding: EdgeInsets.only(top: 3.0),
child: Text(
'4',
style:
TextStyle(fontSize: 13.0, color: Colors.grey),
),
),
IconButton(
iconSize: 20.0,
icon: Icon(
FontAwesomeIcons.calendarAlt,
color: Colors.blue,
),
onPressed: () {})
],
),
Divider(
height: 0.0,
),
Container(
padding: EdgeInsets.only(top: 2.0),
child: ListView.builder(
shrinkWrap: true,
itemCount: model.fixtureList == null
? 0
: model.getFixturesCount(),
itemBuilder: (context, int i) {
var fixture = model.fixtureList[i];

return FixtureListItem(fixture: fixture);
},
))
],
)
],
));
}









share|improve this question






















  • In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
    – anmol.majhail
    Nov 5 at 5:17













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a 'Filter' and below that is a list of soccer matches. I Wrap 'Filter and' listview builder' with a ListView (so that the overload writing under blablabla is resolved). But there is something strange when you scroll normally. scroll to the list that doesn't work. there is only a 'glow effect', but I scroll from the 'Filter menu' above, the scroll works. How do I make the scroll run normally?



see image



My snipped code:



Widget _buildListView(FixtureModel model, BuildContext context) {
return Container(
child: model.getFixturesCount() == 0
? Center(child: Text('No fixtures found'))
: ListView(
shrinkWrap: true,
children: <Widget>[
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 10.0),
child: InkWell(
onTap: () => _onTap(context),
child: Container(
margin:
EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5.0),
child:
Icon(FontAwesomeIcons.github)),
Container(
padding: EdgeInsets.only(left: 15.0),
child: Text(
'Liga Premier Inggris',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500),
),
),
Container(
padding: EdgeInsets.only(
left: 5.0, top: 2.0),
child: Icon(Icons.arrow_drop_down,
size: 17.0))
],
)),
)),
Container(
padding: EdgeInsets.only(top: 3.0),
child: Text(
'4',
style:
TextStyle(fontSize: 13.0, color: Colors.grey),
),
),
IconButton(
iconSize: 20.0,
icon: Icon(
FontAwesomeIcons.calendarAlt,
color: Colors.blue,
),
onPressed: () {})
],
),
Divider(
height: 0.0,
),
Container(
padding: EdgeInsets.only(top: 2.0),
child: ListView.builder(
shrinkWrap: true,
itemCount: model.fixtureList == null
? 0
: model.getFixturesCount(),
itemBuilder: (context, int i) {
var fixture = model.fixtureList[i];

return FixtureListItem(fixture: fixture);
},
))
],
)
],
));
}









share|improve this question













I have a 'Filter' and below that is a list of soccer matches. I Wrap 'Filter and' listview builder' with a ListView (so that the overload writing under blablabla is resolved). But there is something strange when you scroll normally. scroll to the list that doesn't work. there is only a 'glow effect', but I scroll from the 'Filter menu' above, the scroll works. How do I make the scroll run normally?



see image



My snipped code:



Widget _buildListView(FixtureModel model, BuildContext context) {
return Container(
child: model.getFixturesCount() == 0
? Center(child: Text('No fixtures found'))
: ListView(
shrinkWrap: true,
children: <Widget>[
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 10.0),
child: InkWell(
onTap: () => _onTap(context),
child: Container(
margin:
EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5.0),
child:
Icon(FontAwesomeIcons.github)),
Container(
padding: EdgeInsets.only(left: 15.0),
child: Text(
'Liga Premier Inggris',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500),
),
),
Container(
padding: EdgeInsets.only(
left: 5.0, top: 2.0),
child: Icon(Icons.arrow_drop_down,
size: 17.0))
],
)),
)),
Container(
padding: EdgeInsets.only(top: 3.0),
child: Text(
'4',
style:
TextStyle(fontSize: 13.0, color: Colors.grey),
),
),
IconButton(
iconSize: 20.0,
icon: Icon(
FontAwesomeIcons.calendarAlt,
color: Colors.blue,
),
onPressed: () {})
],
),
Divider(
height: 0.0,
),
Container(
padding: EdgeInsets.only(top: 2.0),
child: ListView.builder(
shrinkWrap: true,
itemCount: model.fixtureList == null
? 0
: model.getFixturesCount(),
itemBuilder: (context, int i) {
var fixture = model.fixtureList[i];

return FixtureListItem(fixture: fixture);
},
))
],
)
],
));
}






list listview dart flutter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 5 at 2:08









Muhammad Imanudin

5311




5311












  • In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
    – anmol.majhail
    Nov 5 at 5:17


















  • In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
    – anmol.majhail
    Nov 5 at 5:17
















In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
– anmol.majhail
Nov 5 at 5:17




In your ListView -add shrinkWrap: true, physics: NeverScrollableScrollPhysics()
– anmol.majhail
Nov 5 at 5:17












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










In your ListView add:



shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),


To take Out Filter From ListView: remove physics: NeverScrollableScrollPhysics(), then in ListView



body: Column(
children: <Widget>[
Filter(),
Expanded(
child: ListView()
),
]
)





share|improve this answer























  • Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
    – Muhammad Imanudin
    Nov 5 at 6:18






  • 1




    Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
    – anmol.majhail
    Nov 5 at 6:37












  • nice dude.. you save my day, very much help.
    – Muhammad Imanudin
    Nov 5 at 7:28











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147429%2fflutter-scrolling-listview-inside-listview-builder%23new-answer', 'question_page');
}
);

Post as a guest
































1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










In your ListView add:



shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),


To take Out Filter From ListView: remove physics: NeverScrollableScrollPhysics(), then in ListView



body: Column(
children: <Widget>[
Filter(),
Expanded(
child: ListView()
),
]
)





share|improve this answer























  • Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
    – Muhammad Imanudin
    Nov 5 at 6:18






  • 1




    Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
    – anmol.majhail
    Nov 5 at 6:37












  • nice dude.. you save my day, very much help.
    – Muhammad Imanudin
    Nov 5 at 7:28















up vote
1
down vote



accepted










In your ListView add:



shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),


To take Out Filter From ListView: remove physics: NeverScrollableScrollPhysics(), then in ListView



body: Column(
children: <Widget>[
Filter(),
Expanded(
child: ListView()
),
]
)





share|improve this answer























  • Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
    – Muhammad Imanudin
    Nov 5 at 6:18






  • 1




    Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
    – anmol.majhail
    Nov 5 at 6:37












  • nice dude.. you save my day, very much help.
    – Muhammad Imanudin
    Nov 5 at 7:28













up vote
1
down vote



accepted







up vote
1
down vote



accepted






In your ListView add:



shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),


To take Out Filter From ListView: remove physics: NeverScrollableScrollPhysics(), then in ListView



body: Column(
children: <Widget>[
Filter(),
Expanded(
child: ListView()
),
]
)





share|improve this answer














In your ListView add:



shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),


To take Out Filter From ListView: remove physics: NeverScrollableScrollPhysics(), then in ListView



body: Column(
children: <Widget>[
Filter(),
Expanded(
child: ListView()
),
]
)






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 5 at 6:39

























answered Nov 5 at 5:19









anmol.majhail

857110




857110












  • Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
    – Muhammad Imanudin
    Nov 5 at 6:18






  • 1




    Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
    – anmol.majhail
    Nov 5 at 6:37












  • nice dude.. you save my day, very much help.
    – Muhammad Imanudin
    Nov 5 at 7:28


















  • Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
    – Muhammad Imanudin
    Nov 5 at 6:18






  • 1




    Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
    – anmol.majhail
    Nov 5 at 6:37












  • nice dude.. you save my day, very much help.
    – Muhammad Imanudin
    Nov 5 at 7:28
















Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
– Muhammad Imanudin
Nov 5 at 6:18




Wow ... cool, thanks you for your help. one thing, is it possible that the 'filter' is standing upright then when the scroll is just a list that moves?
– Muhammad Imanudin
Nov 5 at 6:18




1




1




Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
– anmol.majhail
Nov 5 at 6:37






Yes Move the Filter Out of ListView, In Column 1st Widget - Filter 2nd Listview. body: Column children: <Widget>[Filter(),Expanded (ListView())] i Updated answer with Code
– anmol.majhail
Nov 5 at 6:37














nice dude.. you save my day, very much help.
– Muhammad Imanudin
Nov 5 at 7:28




nice dude.. you save my day, very much help.
– Muhammad Imanudin
Nov 5 at 7:28


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147429%2fflutter-scrolling-listview-inside-listview-builder%23new-answer', 'question_page');
}
);

Post as a guest