David PHAM-VAN

Add PageTheme.copyWith

@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 - Reorder MultiPage paint operations 7 - Reorder MultiPage paint operations
8 - Fix Bullet widget styling 8 - Fix Bullet widget styling
9 - Fix HSV and HSL Color constructors 9 - Fix HSV and HSL Color constructors
  10 +- Add PageTheme.copyWith
10 11
11 ## 1.4.1 12 ## 1.4.1
12 13
@@ -68,4 +68,23 @@ class PageTheme { @@ -68,4 +68,23 @@ class PageTheme {
68 pageFormat.marginRight, pageFormat.marginBottom); 68 pageFormat.marginRight, pageFormat.marginBottom);
69 } 69 }
70 } 70 }
  71 +
  72 + PageTheme copyWith({
  73 + PdfPageFormat pageFormat,
  74 + BuildCallback buildBackground,
  75 + BuildCallback buildForeground,
  76 + Theme theme,
  77 + PageOrientation orientation,
  78 + EdgeInsets margin,
  79 + bool clip,
  80 + }) =>
  81 + PageTheme(
  82 + pageFormat: pageFormat ?? this.pageFormat,
  83 + buildBackground: buildBackground ?? this.buildBackground,
  84 + buildForeground: buildForeground ?? this.buildForeground,
  85 + theme: theme ?? this.theme,
  86 + orientation: orientation ?? this.orientation,
  87 + margin: margin ?? this.margin,
  88 + clip: clip ?? this.clip,
  89 + );
71 } 90 }