FlatButton constructor

FlatButton({
  1. PdfColor textColor = PdfColors.white,
  2. PdfColor color = PdfColors.blue,
  3. PdfColor colorDown = PdfColors.red,
  4. PdfColor colorRollover = PdfColors.blueAccent,
  5. EdgeInsetsGeometry? padding,
  6. BoxDecoration? decoration,
  7. Set<PdfAnnotFlags>? flags,
  8. required Widget child,
  9. required String name,
  10. PdfIndirect? replaces,
})

Implementation

FlatButton({
  PdfColor textColor = PdfColors.white,
  PdfColor color = PdfColors.blue,
  PdfColor colorDown = PdfColors.red,
  PdfColor colorRollover = PdfColors.blueAccent,
  EdgeInsetsGeometry? padding,
  BoxDecoration? decoration,
  this.flags,
  required Widget child,
  required this.name,
  this.replaces,
})  : _childDown = Container(
        child: DefaultTextStyle(
          style: TextStyle(color: textColor),
          child: child,
        ),
        decoration: decoration ??
            BoxDecoration(
              color: colorDown,
              borderRadius: const BorderRadius.all(Radius.circular(2)),
            ),
        padding: padding ??
            const EdgeInsets.symmetric(horizontal: 20, vertical: 5),
      ),
      _childRollover = Container(
        child: DefaultTextStyle(
          style: TextStyle(color: textColor),
          child: child,
        ),
        decoration: decoration ??
            BoxDecoration(
              color: colorRollover,
              borderRadius: const BorderRadius.all(Radius.circular(2)),
            ),
        padding: padding ??
            const EdgeInsets.symmetric(horizontal: 20, vertical: 5),
      ),
      super(
        child: Container(
          child: DefaultTextStyle(
            style: TextStyle(color: textColor),
            child: child,
          ),
          decoration: decoration ??
              BoxDecoration(
                color: color,
                borderRadius: const BorderRadius.all(Radius.circular(2)),
              ),
          padding: padding ??
              const EdgeInsets.symmetric(horizontal: 20, vertical: 5),
        ),
      );