CellStyle class Styling
Styling class for cells.
Constructors
- CellStyle({ExcelColor fontColorHex = ExcelColor.black, ExcelColor backgroundColorHex = ExcelColor.none, FillPatternType? fillPattern, ExcelColor fillBackgroundColorHex = ExcelColor.none, int? fontSize, String? fontFamily, FontScheme? fontScheme, HorizontalAlign horizontalAlign = HorizontalAlign.Left, VerticalAlign verticalAlign = VerticalAlign.Bottom, TextWrapping? textWrapping, bool bold = false, Underline underline = Underline.None, bool italic = false, int rotation = 0, int indent = 0, Border? leftBorder, Border? rightBorder, Border? topBorder, Border? bottomBorder, Border? diagonalBorder, bool diagonalBorderUp = false, bool diagonalBorderDown = false, NumFormat numberFormat = NumFormat.standard_0})
- Creates a CellStyle with the given formatting properties.
Properties
- backgroundColor ↔ ExcelColor
-
The cell's fill (foreground) colour.
getter/setter pair
- bottomBorder ↔ Border
-
The border drawn on the bottom side of the cell.
getter/setter pair
- diagonalBorder ↔ Border
-
The diagonal border drawn across the cell.
getter/setter pair
- diagonalBorderDown ↔ bool
-
Whether the diagonal border runs downward (top-left to bottom-right).
getter/setter pair
- diagonalBorderUp ↔ bool
-
Whether the diagonal border runs upward (bottom-left to top-right).
getter/setter pair
- fillBackgroundColor ↔ ExcelColor
-
The pattern's background colour (the
bgColor), used only when fillPattern is a non-solid pattern. Defaults to ExcelColor.none.getter/setter pair - fillPattern ↔ FillPatternType?
-
The fill pattern.
null(or FillPatternType.solid) means a plain solid fill of backgroundColor; a hatch/shade pattern draws using backgroundColor as the pattern colour over fillBackgroundColor.getter/setter pair - fontColor ↔ ExcelColor
-
The colour of the cell's text.
getter/setter pair
- fontFamily ↔ String?
-
The name of the font applied to the cell, or
nullfor the default.getter/setter pair - fontScheme ↔ FontScheme
-
The font scheme (major, minor, or none) the font belongs to.
getter/setter pair
- fontSize ↔ int?
-
The font size in points, or
nullfor the default size.getter/setter pair - hashCode → int
-
The hash code for this object.
no setteroverride
- horizontalAlignment ↔ HorizontalAlign
-
The horizontal alignment of the cell's content.
getter/setter pair
- indent ↔ int
-
Indentation level, applied on the alignment side of the cell (left for
left-aligned text, right for right-aligned). Each level is a small amount
of horizontal padding. Clamped to be non-negative.
getter/setter pair
- isBold ↔ bool
-
Whether the cell's text is bold.
getter/setter pair
- isItalic ↔ bool
-
Whether the cell's text is italic.
getter/setter pair
- leftBorder ↔ Border
-
The border drawn on the left side of the cell.
getter/setter pair
- numberFormat ↔ NumFormat
-
The number format applied to this cell.
getter/setter pair
- rightBorder ↔ Border
-
The border drawn on the right side of the cell.
getter/setter pair
- rotation ↔ int
-
The text rotation angle, in degrees.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- topBorder ↔ Border
-
The border drawn on the top side of the cell.
getter/setter pair
- underline ↔ Underline
-
The underline style applied to the cell's text.
getter/setter pair
- verticalAlignment ↔ VerticalAlign
-
The vertical alignment of the cell's content.
getter/setter pair
- wrap ↔ TextWrapping?
-
How the cell's text wraps within its bounds, or
nullfor no wrapping.getter/setter pair
Methods
-
copyWith(
{ExcelColor? fontColorHexVal, ExcelColor? backgroundColorHexVal, FillPatternType? fillPatternVal, ExcelColor? fillBackgroundColorHexVal, String? fontFamilyVal, FontScheme? fontSchemeVal, HorizontalAlign? horizontalAlignVal, VerticalAlign? verticalAlignVal, TextWrapping? textWrappingVal, bool? boldVal, bool? italicVal, Underline? underlineVal, int? fontSizeVal, int? rotationVal, int? indentVal, Border? leftBorderVal, Border? rightBorderVal, Border? topBorderVal, Border? bottomBorderVal, Border? diagonalBorderVal, bool? diagonalBorderUpVal, bool? diagonalBorderDownVal, NumFormat? numberFormat}) → CellStyle - Returns a copy of this style with the specified properties replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override