Hello,
I am trying to take data from firebase and map each element of my model to columns
Here is my model:
I supply my data using the provider package which creates an instance of the model class with the firebase data.
Here is my screen where you click a button to display pdf
final usersList = Provider.of<List<Report>>(context);
My question is this... How do I take the 'usersList' which is a list of my Report model ( List<Report>
Help is appreciated!
Hello Chinnu,
This is exactly what I needed! I very much appreciate the time you took to answer my question and very clearly as well! The syncfusion team has been great and I am going to continue my subscription.
Thanks,
Tim
I tried the code but the system is giving an error. What to do?
Hi Anand,
Could you please explain same with image URL, I want to show image also in each row along with user details
Support will be highly appreciated!!
Regards
Mohammed Yusuf
dependencies:
http: ^0.12.2 |
import 'package:http/http.dart' show get; |
//Read an image data from website/webspace var url = "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"; var response = await get(url); var data = response.bodyBytes; |
//Create a new PDF document PdfDocument document = PdfDocument(); //Load an image from image data PdfBitmap image = PdfBitmap(data); //Draw image in page graphics document.pages.add().graphics.drawImage(image, const Rect.fromLTWH(0, 0, 500, 200)); //Save and launch the document final List<int> bytes = document.save(); //Dispose the document. document.dispose(); |