How to List Several Formulars in FLUTTER Within a Card

Asked

Viewed 56 times

0

I’m trying to list the information inside the forms in a single Card, but I can’t because the Card has only one property title and a subtitle.

My Code :

@override
  Widget build(BuildContext context) {
    return     Card(
      child: ListTile(
        title: Text(
          compras.produtos.toString(),
          style: TextStyle(
            fontSize: 24.0,
          ),
        ),
        subtitle: Text(
          compras.fornecedor+compras.cnpj+compras.data+compras.observacao,
          style: TextStyle(
            fontSize: 16.0,
          ),
        ),
      ),
    );
  }
}
  • 1

    A ListTile is kind of like a default list widget for you to use, which is what you need for simple lists with a Title and a Description, for example a basic client list that shows Name and Mobile. For your case you need to create something more elaborate, a gross example is to put inside the Card a Column and within it, place several Text, each with the information you want. Getting +/- like this: Card > Column [Text(cnpj), Text(data), ...].

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.