I need to create the following layout.
So far I have this, but as much as I try to understand the logic of the order of the widgets, I can not find what I want.
body: new Stack(
children: <Widget>[
new Container(
decoration: _recursos.backgroundImageComun(),
),
new Column(
children: <Widget>[
new Container(
height: 196.0,
child: new Stack(
children: <Widget>[
new ListView(
scrollDirection: Axis.horizontal,
children: new List.generate(15, (int index) {
new Positioned(
child: new GestureDetector(
onTap: () {
randomizer(index);
},
child: new Container(
width: 110.0,
height: 196.0,
child: new Image(
image: new AssetImage(
'assets/bgcard-a.jpg'),
fit: BoxFit.cover))));
}),
)
],
))
],
)
],
),
UPDATE:
If I do it without the elements: ListView-> Positioned-> GestureDetector I can do it, but it's not the idea.
I need to put it in a listView by the horizontal Scroll, and generate the items dynamically because the number of letters is variable. And logically using the Positioned to give the left "margin". And in the end the GestureDetector to work the selected letter. THOSE elements, are the ones that I can not make them work.
body: new Stack(children: <Widget>[
new Container(
decoration: _recursos.backgroundImageComun(),
),
new Column(
children: <Widget>[
new Container(
height: 196.0,
child: new Stack(children: <Widget>[
//ListView->GestureDetector->Positioned
new Positioned(
left: 0.0,
child: new Container(
width: 110.0,
height: 196.0,
child: new Image(
image: new AssetImage('assets/bgcard-a.jpg'),
fit: BoxFit.cover))),
new Positioned(
left: 40.0,
child: new Container(
width: 110.0,
height: 196.0,
child: new Image(
image: new AssetImage('assets/bgcard-a.jpg'),
fit: BoxFit.cover))),
]),
),
],
),
])