Search code examples
flutterdartdatatableflutter-layout

I have Three Lists with user inputs how to create a table flutter


Lists with user inputs

List1 =[1,2,3,.....];
List2 =[0.1,0.2,0.3,.....];
List3 =[0.5,0.10,6.0,....];

How Can I Create a table Like following image Please help Me I am stuck

Final Out Example Image
Final Out Example Image


Solution

  • So you want a List of Lists. You could do something like this:

    List<List<dynamic>> listMap = [];
    
    listMap.add(List1);
    listMap.add(List2);
    listMap.add(List3);
    

    Note I put dynamic because I don't know what types of variables you want.