FlatButton constructor
FlatButton({
- PdfColor textColor = PdfColors.white,
- PdfColor color = PdfColors.blue,
- PdfColor colorDown = PdfColors.red,
- PdfColor colorRollover = PdfColors.blueAccent,
- EdgeInsetsGeometry? padding,
- BoxDecoration? decoration,
- Set<
PdfAnnotFlags> ? flags, - required Widget child,
- required String name,
- 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),
),
);