Page constructor

Page({
  1. PageTheme? pageTheme,
  2. PdfPageFormat? pageFormat,
  3. required BuildCallback build,
  4. ThemeData? theme,
  5. PageOrientation? orientation,
  6. EdgeInsetsGeometry? margin,
  7. bool clip = false,
  8. TextDirection? textDirection,
})

Implementation

Page({
  PageTheme? pageTheme,
  PdfPageFormat? pageFormat,
  required BuildCallback build,
  ThemeData? theme,
  PageOrientation? orientation,
  EdgeInsetsGeometry? margin,
  bool clip = false,
  TextDirection? textDirection,
})  : assert(
          pageTheme == null ||
              (pageFormat == null &&
                  theme == null &&
                  orientation == null &&
                  margin == null &&
                  clip == false &&
                  textDirection == null),
          'Don\'t set both pageTheme and other settings'),
      pageTheme = pageTheme ??
          PageTheme(
            pageFormat: pageFormat,
            orientation: orientation,
            margin: margin,
            theme: theme,
            clip: clip,
            textDirection: textDirection,
          ),
      _build = build;