currently i develop website by using flutter , there are button for download the PDF , when in debug mode by using command flutter run -d chrome
i can download the PDF, but after i host and try it, it wont even download.
Here is the button code
DataCell(
Center(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SizedBox(
width: 150,
height: 35,
child: ElevatedButton(
onPressed: () async {
try {
await QuotationPDF.generatePDF(quotation);
} catch (error) {
print('Error generating PDF: $error');
}
},
child: Text(
'Download',
style: TextStyle(fontSize: 8),
),
),
),
),
),
),
i expect it can download when i deploy hosting instead of only can download when in debug mode.