bold property
Gets/sets font bold.
final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set font bold.
style.bold = true;
range1.number = 10;
range1.cellStyle = style;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();
Implementation
@override
bool get bold {
bool boldStyle = false;
bool first = true;
final int last = _arrRanges.length;
for (int index = 0; index < last; index++) {
final Range range = _arrRanges[index];
if (first) {
boldStyle = range.cellStyle.bold;
first = false;
} else if (range.cellStyle.bold != boldStyle) {
return false;
}
}
return boldStyle;
}
Gets/sets font bold.
final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set font bold.
style.bold = true;
range1.number = 10;
range1.cellStyle = style;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();
Implementation
@override
set bold(bool value) {
final int last = _arrRanges.length;
for (int index = 0; index < last; index++) {
final Range range = _arrRanges[index];
range.cellStyle.bold = value;
}
}