I'm trying to make use of the PageView
widget. I placed the PageView
in a Column
so that It can only take 50% of the screen height.
The problem now is that I have an image background of the page underneath the PageView
and I need it to have a transparent background so that the user can see the image background under the PageView
.
I tried to set the children's background to Colors.transparent
but It doesn't work because the container itself is not transparent.
PageView::build
@override
Widget build(BuildContext context) {
return PageView.builder(
controller: pageController,
itemBuilder: (context, index) {
return Container(
color: Colors.transparent,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
TrackAvatar(imageUrl: _list[index].url),
Text(_list[index].name),
],
));
},
itemCount: 5,
);
}
How can I make the PageView
widget transparent?