Ad

How To Store Selected Values In ListViewBuilder And Passing To Next Screen

- 1 answer

Is There any Option to Store Selected Values in List View and passsing to the Next Screen like the Selected Value is Stored in Variable we pass that variable to next screen

Ad

Answer

Try this..

 ListView.builder(
        itemCount: myData.length,
        itemBuilder: (context,index){
        return ListTile(
          onTap: (){
            Navigator.pushNamed(context, 'secondScreen',arguments: myData[index]);
          },
        );
      },
      ),
Ad
source: stackoverflow.com
Ad