Derrick Liu
Committed by David PHAM-VAN

provide borderStyle parameter for dividers

@@ -796,6 +796,7 @@ class Divider extends StatelessWidget { @@ -796,6 +796,7 @@ class Divider extends StatelessWidget {
796 this.indent, 796 this.indent,
797 this.endIndent, 797 this.endIndent,
798 this.color, 798 this.color,
  799 + this.borderStyle,
799 }) : assert(height == null || height >= 0.0), 800 }) : assert(height == null || height >= 0.0),
800 assert(thickness == null || thickness >= 0.0), 801 assert(thickness == null || thickness >= 0.0),
801 assert(indent == null || indent >= 0.0), 802 assert(indent == null || indent >= 0.0),
@@ -816,6 +817,9 @@ class Divider extends StatelessWidget { @@ -816,6 +817,9 @@ class Divider extends StatelessWidget {
816 /// The thickness of the line drawn within the divider. 817 /// The thickness of the line drawn within the divider.
817 final double? thickness; 818 final double? thickness;
818 819
  820 + /// The border style of the divider
  821 + final BorderStyle? borderStyle;
  822 +
819 @override 823 @override
820 Widget build(Context context) { 824 Widget build(Context context) {
821 final height = this.height ?? 16; 825 final height = this.height ?? 16;
@@ -823,6 +827,7 @@ class Divider extends StatelessWidget { @@ -823,6 +827,7 @@ class Divider extends StatelessWidget {
823 final indent = this.indent ?? 0; 827 final indent = this.indent ?? 0;
824 final endIndent = this.endIndent ?? 0; 828 final endIndent = this.endIndent ?? 0;
825 final color = this.color ?? PdfColors.black; 829 final color = this.color ?? PdfColors.black;
  830 + final borderStyle = this.borderStyle ?? BorderStyle.solid;
826 831
827 return SizedBox( 832 return SizedBox(
828 height: height, 833 height: height,
@@ -835,6 +840,7 @@ class Divider extends StatelessWidget { @@ -835,6 +840,7 @@ class Divider extends StatelessWidget {
835 bottom: BorderSide( 840 bottom: BorderSide(
836 color: color, 841 color: color,
837 width: thickness, 842 width: thickness,
  843 + style: borderStyle,
838 ), 844 ),
839 ), 845 ),
840 ), 846 ),
@@ -851,6 +857,7 @@ class VerticalDivider extends StatelessWidget { @@ -851,6 +857,7 @@ class VerticalDivider extends StatelessWidget {
851 this.indent, 857 this.indent,
852 this.endIndent, 858 this.endIndent,
853 this.color, 859 this.color,
  860 + this.borderStyle,
854 }) : assert(width == null || width >= 0.0), 861 }) : assert(width == null || width >= 0.0),
855 assert(thickness == null || thickness >= 0.0), 862 assert(thickness == null || thickness >= 0.0),
856 assert(indent == null || indent >= 0.0), 863 assert(indent == null || indent >= 0.0),
@@ -871,6 +878,9 @@ class VerticalDivider extends StatelessWidget { @@ -871,6 +878,9 @@ class VerticalDivider extends StatelessWidget {
871 /// The thickness of the line drawn within the divider. 878 /// The thickness of the line drawn within the divider.
872 final double? thickness; 879 final double? thickness;
873 880
  881 + /// The border style of the divider
  882 + final BorderStyle? borderStyle;
  883 +
874 @override 884 @override
875 Widget build(Context context) { 885 Widget build(Context context) {
876 final width = this.width ?? 16; 886 final width = this.width ?? 16;
@@ -878,6 +888,7 @@ class VerticalDivider extends StatelessWidget { @@ -878,6 +888,7 @@ class VerticalDivider extends StatelessWidget {
878 final indent = this.indent ?? 0; 888 final indent = this.indent ?? 0;
879 final endIndent = this.endIndent ?? 0; 889 final endIndent = this.endIndent ?? 0;
880 final color = this.color ?? PdfColors.black; 890 final color = this.color ?? PdfColors.black;
  891 + final borderStyle = this.borderStyle ?? BorderStyle.solid;
881 892
882 return SizedBox( 893 return SizedBox(
883 width: width, 894 width: width,
@@ -890,6 +901,7 @@ class VerticalDivider extends StatelessWidget { @@ -890,6 +901,7 @@ class VerticalDivider extends StatelessWidget {
890 left: BorderSide( 901 left: BorderSide(
891 color: color, 902 color: color,
892 width: thickness, 903 width: thickness,
  904 + style: borderStyle,
893 ), 905 ),
894 ), 906 ),
895 ), 907 ),