color property

  1. @override
String get color
override

Gets/sets borderline color.

Implementation

@override
String get color => _color;
  1. @override
set color (String value)
override

Gets/sets borderline color.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set borders line color.
style.borders.all.lineStyle = LineStyle.thick;
style.borders.all.color = '#9954CC';
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 color(String value) {
  _color = value;
  _colorRgb =
      Color(int.parse(_color.substring(1, 7), radix: 16) + 0xFF000000);
}