You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow context.res.send(); 1st parameter accepts String and bytes so as to send Uint8List as data.
I am trying to send Uint8List as the 1st parameter getting the below error
Future<dynamic> main(final context) async {
final pdf =PDF();
final order =FakeOrder();
var fakeOrder = order.createFakeOrder();
context.log(fakeOrder.toJson().toString());
finalUint8List? bytes =await pdf.createAndSave(fakeOrder);
if (bytes !=null) {
context.log('PDF created.');
context.log(bytes);
return context.res.send(bytes, 200, {'Content-Type':'application/pdf'});
}
return context.error("Someting gone wrong");
}
type 'Uint8List' is not a subtype of type 'String' of 'body'
#0 main (package:generate_pdf/main.dart)
<asynchronous suspension>
#1 Future.any.onValue (dart:async/future.dart:615)
<asynchronous suspension>
🔖 Feature description
Allow context.res.send(); 1st parameter accepts String and bytes so as to send Uint8List as data.
I am trying to send
Uint8List
as the 1st parameter getting the below error🎤 Pitch
Allow to accept 1st parameter as dynamic
OLD
NEW
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: