I am working in flutter web automation as fresher.
I download the file from Download button present on the web. And downlaoded file by default download in PDF format. I just need to verify the download file name. Can anyone help me.
class DownloadButton extends StatelessWidget {
final VoidCallback callback;
const DownloadButton(this.callback,{Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return OutlinedButton(onPressed: ()=>callback(), child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Text(Strings.global_download),
SizedBox(width: 6,),
Icon(Icons.download)
],
)
],
));
}
}
The file is not accessable at this level- provide usage of DownloadButton(...) You can access the file in parent widget ( where callback is defined)