We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
To Reproduce Code snippet to reproduce the behavior:
// ignore_for_file: deprecated_member_use import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart' as pw; import 'package:printing/printing.dart' as pr; import '../../../../../models/basket/basket_model.dart'; Future<Future<bool>> printSalesCheck( BuildContext context, List<BasketModel> productList, ) async { return pr.Printing.layoutPdf( onLayout: (format) => _generateSalesCheckPdf(format, productList), ); } Future<Uint8List> _generateSalesCheckPdf( PdfPageFormat format, List<BasketModel> productList, ) async { final pdf = pw.Document(); pdf.addPage( pw.Page( build: (pw.Context context) { return pw.Container( width: double.infinity, child: pw.Column( crossAxisAlignment: pw.CrossAxisAlignment.start, children: [ pw.Text( 'Nakladnoy', style: pw.TextStyle( fontSize: 24, fontWeight: pw.FontWeight.bold, ), ), pw.SizedBox(height: 20), pw.Table.fromTextArray( headerStyle: pw.TextStyle( fontWeight: pw.FontWeight.bold, ), data: productList.map((sale) { return [ sale.store.name, sale.quantity.toString(), (sale.basketPrice[0].agreedPrice.toString()), (NumberFormat("##,###", "uz_UZ").format( double.parse(sale.basketPrice[0].agreedPrice) * double.tryParse(sale.quantity)!)), ]; }).toList(), border: pw.TableBorder.all(), ), pw.SizedBox(height: 20), pw.Text(""" ВНИМАНИЕ! После передачи товара продавцом покупателю, в дальнейшем ответственность за товар ПОЛНОСТЬЮ несет ПОКУПАТЕЛЬ. Возврат товара допускается, при отсутствии следов повреждений и порчи товара! При возврате товара просим учитовать оставшиеся время до истичения сроков годгности товара! Продукция "SOBSAN, MASTER, CHROME, UNUKA, TYTAN, POLIFIX и ARTELIT" принимаются на следующих условиях: До истичения срока годности осталось : 3 месяца -10% от стоимости товара; 2 месяца - 20% от стоимости товара; 1 месяц - 30 % от стоимости товара; Просроченные товры: "TYTAN, POLIFIX и ARTELIT" - не принимаются "SOBSAN, MASTER, CHROME, UNUKA" -40 % от стоимости товара """) ], ), ); }, ), ); return pdf.save(); } ![image](https://github.com/DavBfr/dart_pdf/assets/96409206/15b5c5b1-b3c0-463d-beac-0b3043ba432c)
Expected behavior
Screenshots
Flutter Doctor
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
To Reproduce
Code snippet to reproduce the behavior:
Expected behavior
Screenshots
Flutter Doctor
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: