David PHAM-VAN

Add a default page format constant

... ... @@ -24,7 +24,7 @@ class PdfPage extends PdfObject {
///
/// @param pdfDocument Document
/// @param pageFormat [PdfPageFormat] describing the page size
PdfPage(PdfDocument pdfDocument, {this.pageFormat = PdfPageFormat.a4})
PdfPage(PdfDocument pdfDocument, {this.pageFormat = PdfPageFormat.standard})
: super(pdfDocument, '/Page') {
pdfDocument.pdfPageList.pages.add(this);
}
... ...
... ... @@ -39,6 +39,8 @@ class PdfPageFormat {
static const PdfPageFormat legal =
PdfPageFormat(8.5 * inch, 14.0 * inch, marginAll: inch);
static const PdfPageFormat standard = a4;
static const double point = 1.0;
static const double inch = 72.0;
static const double cm = inch / 2.54;
... ...
... ... @@ -64,7 +64,7 @@ typedef BuildListCallback = List<Widget> Function(Context context);
class Page extends BasePage {
Page(
{PdfPageFormat pageFormat = PdfPageFormat.a4,
{PdfPageFormat pageFormat = PdfPageFormat.standard,
BuildCallback build,
this.theme,
EdgeInsets margin})
... ...