lineStyle property

  1. @override
LineStyle get lineStyle
override

Gets/sets border line style.

Implementation

@override
LineStyle get lineStyle {
  LineStyle lineStyleStyle = _lineStyle;
  bool first = true;

  for (final Border? border in _borders) {
    if (first) {
      lineStyleStyle = border!.lineStyle;
      first = false;
    } else if (border!.lineStyle != lineStyleStyle) {
      return LineStyle.none;
    }
  }
  return lineStyleStyle;
}
  1. @override
set lineStyle (LineStyle value)
override

Gets/sets border line style.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set borders line.
style.borders.all.lineStyle = LineStyle.thick;
final Range range1 = sheet.getRangeByIndex(3, 4);
range1.number = 10;
range1.cellStyle = style;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

@override
set lineStyle(LineStyle value) {
  for (final Border? border in _borders) {
    border!.lineStyle = value;
  }
}