I need to pass the asset path which is a text file to a new Screen. I want to pass that asset path from a ListTile by using OnTap() and pass that path to a new screen class.
Asset path:
'lib/asset/textfile/cs_one.txt'
My ListTile:
ListTile(
leading: CircleAvatar(
backgroundImage: AssetImage("image/icon.png"),
),
title: Text("Story One"),
trailing: Icon(Icons.arrow_forward),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => cs_one() ),
);
}
I want to pass the path to another class which is a new screen from where I will load the asset data. I know how to load the asset data I just needed help passing it from ListTile to the new screen class.