-3
Good afternoon, you guys!
Could you help me with a question?
What am I doing:
I created a Listview. inside my body. As you can see I am passing an itemCount: data.length, because I created a List Dice that gathers all other Lists the return of my data[index] is:
[Infracao{id: 20, conteudo: DIRIGIR veículo SEM possuir CNH}] [Anexo{id: 40, nome: GESTOS DE AGENTES, conteudo: movimentos convencionais de braço, adotados exclusivamente pelos agentes de autoridades de trânsito nas vias, para orientar, indicar o direi [Fiscalizacao{id: 40, nome: VIADUTO,}]
And how I’m doing and my doubt
As you can see I need to compare if (dados[index] is Infracao) return ListaInfracao(dados[index] as Infracao);
and so to others or be it returns me to LIST
But beyond the list I’d like him to bring a Pedding calling a Text("Infringements") below returns the list and so on to the others.
Because of the way it is just giving a Return in the list and before giving the Return in the list I would like to return tmb a TEXT, below is picture of how it is currently as I would like it to be.
body: Column(
children: <Widget>[
Expanded(
child: ListView.builder(
padding: EdgeInsets.all(10.0),
itemCount: dados.length,
itemBuilder: (BuildContext context, int index) {
if (dados[index] is Infracao)
//AQUI RETORNARIA UM PEDDING TEXT();
//DEPOIS A LISTA
return ListaInfracao(dados[index] as Infracao);
if (dados[index] is Anexo)
return ListaAnexos(dados[index] as Anexo);
else
return ListaFiscalizacao(dados[index] as Fiscalizacao);
},
),
),
],
));
Hey Victor beauty? How about using only one account to ask the questions? And try to finish one question before you start asking others! It’s always good to give feedback to those who are trying to help you.
– Matheus Ribeiro
I will close the other is that you commented to open another question for my doubt put in my other account the limit blocked and I need to take this doubt
– Victor Padovan