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>
Future<dynamic> main(final context) async {
final pdf = PDF();
final order = FakeOrder();
var fakeOrder = order.createFakeOrder();
context.log(fakeOrder.toJson().toString());
final Uint8List? 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");
}