Derrick Liu
Committed by David PHAM-VAN

provide borderStyle parameter for dividers

... ... @@ -796,6 +796,7 @@ class Divider extends StatelessWidget {
this.indent,
this.endIndent,
this.color,
this.borderStyle,
}) : assert(height == null || height >= 0.0),
assert(thickness == null || thickness >= 0.0),
assert(indent == null || indent >= 0.0),
... ... @@ -816,6 +817,9 @@ class Divider extends StatelessWidget {
/// The thickness of the line drawn within the divider.
final double? thickness;
/// The border style of the divider
final BorderStyle? borderStyle;
@override
Widget build(Context context) {
final height = this.height ?? 16;
... ... @@ -823,6 +827,7 @@ class Divider extends StatelessWidget {
final indent = this.indent ?? 0;
final endIndent = this.endIndent ?? 0;
final color = this.color ?? PdfColors.black;
final borderStyle = this.borderStyle ?? BorderStyle.solid;
return SizedBox(
height: height,
... ... @@ -835,6 +840,7 @@ class Divider extends StatelessWidget {
bottom: BorderSide(
color: color,
width: thickness,
style: borderStyle,
),
),
),
... ... @@ -851,6 +857,7 @@ class VerticalDivider extends StatelessWidget {
this.indent,
this.endIndent,
this.color,
this.borderStyle,
}) : assert(width == null || width >= 0.0),
assert(thickness == null || thickness >= 0.0),
assert(indent == null || indent >= 0.0),
... ... @@ -871,6 +878,9 @@ class VerticalDivider extends StatelessWidget {
/// The thickness of the line drawn within the divider.
final double? thickness;
/// The border style of the divider
final BorderStyle? borderStyle;
@override
Widget build(Context context) {
final width = this.width ?? 16;
... ... @@ -878,6 +888,7 @@ class VerticalDivider extends StatelessWidget {
final indent = this.indent ?? 0;
final endIndent = this.endIndent ?? 0;
final color = this.color ?? PdfColors.black;
final borderStyle = this.borderStyle ?? BorderStyle.solid;
return SizedBox(
width: width,
... ... @@ -890,6 +901,7 @@ class VerticalDivider extends StatelessWidget {
left: BorderSide(
color: color,
width: thickness,
style: borderStyle,
),
),
),
... ...