I have to pass parameter to Future async function from floatingbutton
My Codes like
FloatingActionButton(
onPressed: getImageFromCam,
tooltip: 'Pick Image',
child: Icon(Icons.add_a_photo),
),
And
Future getImageFromCam() async { // for camera
var image = await ImagePicker.pickImage(source: ImageSource.camera);
setState(() {
_image = image;
});
}
It is multiple button so i have to pass index to async function.
Can anyone please help to solve this.
Thanks in advance
Sathish