NotebookStyle class
An immutable description of notebook ruling: how the hand-drawn rules look and how far apart they sit.
A NotebookStyle carries ruling values only. It performs no painting, layout, or widget building — it exists to bundle these values, validate them, and support comparison and overriding via copyWith and value equality.
lineHeight is the row height: the vertical distance from one rule to the next, and the unit content is laid onto. Every other property describes the appearance of the hand-drawn rules.
const style = NotebookStyle(lineHeight: 32, lineColor: Color(0xFFBDBDBD));
final bolder = style.copyWith(strokeWidth: 2.0);
- Annotations
Constructors
- NotebookStyle({double lineHeight = HandDrawnDefaults.notebookLineHeight, Color lineColor = HandDrawnDefaults.notebookLineColor, double strokeWidth = HandDrawnDefaults.notebookStrokeWidth, int seed = HandDrawnDefaults.seed, bool uniformLines = true, double irregularity = HandDrawnDefaults.notebookIrregularity, int segments = HandDrawnDefaults.notebookSegments})
-
Creates a notebook ruling style.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- irregularity → double
-
The roughness of the hand-drawn wobble on each ruled line.
final
- lineColor → Color
-
The color of the ruled lines.
final
- lineHeight → double
-
The row height: the vertical distance between consecutive rules, in
logical pixels.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seed → int
-
The base random seed for deterministic line generation.
final
- segments → int
-
The number of linear segments used to draw each ruled line.
final
- strokeWidth → double
-
The width of each ruled line stroke in logical pixels.
final
- uniformLines → bool
-
Whether every ruled line should look identical.
final
Methods
-
copyWith(
{double? lineHeight, Color? lineColor, double? strokeWidth, int? seed, bool? uniformLines, double? irregularity, int? segments}) → NotebookStyle - Returns a copy of this style with the given fields 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