@@ -61,6 +61,7 @@ class EditorCoreInfo {
6161 Color ? backgroundColor;
6262 CanvasBackgroundPattern backgroundPattern;
6363 int lineHeight;
64+ int lineThickness;
6465 List <EditorPage > pages;
6566
6667 /// Stores the current page index so that it can be restored when the file is reloaded.
@@ -74,6 +75,7 @@ class EditorCoreInfo {
7475 backgroundColor: null ,
7576 backgroundPattern: CanvasBackgroundPattern .none,
7677 lineHeight: Prefs .lastLineHeight.value,
78+ lineThickness: Prefs .lastLineThickness.value,
7779 pages: [],
7880 initialPageIndex: null ,
7981 assetCache: null ,
@@ -95,6 +97,7 @@ class EditorCoreInfo {
9597 }) : nextImageId = 0 ,
9698 backgroundPattern = Prefs .lastBackgroundPattern.value,
9799 lineHeight = Prefs .lastLineHeight.value,
100+ lineThickness = Prefs .lastLineThickness.value,
98101 pages = [],
99102 assetCache = AssetCache ();
100103
@@ -106,6 +109,7 @@ class EditorCoreInfo {
106109 this .backgroundColor,
107110 required this .backgroundPattern,
108111 required this .lineHeight,
112+ required this .lineThickness,
109113 required this .pages,
110114 required this .initialPageIndex,
111115 required AssetCache ? assetCache,
@@ -168,6 +172,7 @@ class EditorCoreInfo {
168172 return CanvasBackgroundPattern .none;
169173 }(),
170174 lineHeight: json['l' ] as int ? ?? Prefs .lastLineHeight.value,
175+ lineThickness: json['lw' ] as int ? ?? Prefs .lastLineThickness.value,
171176 pages: _parsePagesJson (
172177 json['z' ] as List ? ,
173178 inlineAssets: inlineAssets,
@@ -202,6 +207,7 @@ class EditorCoreInfo {
202207 }) : nextImageId = 0 ,
203208 backgroundPattern = CanvasBackgroundPattern .none,
204209 lineHeight = Prefs .lastLineHeight.value,
210+ lineThickness = Prefs .lastLineThickness.value,
205211 pages = [],
206212 assetCache = AssetCache () {
207213 _migrateOldStrokesAndImages (
@@ -468,6 +474,7 @@ class EditorCoreInfo {
468474 'b' : backgroundColor? .value,
469475 'p' : backgroundPattern.name,
470476 'l' : lineHeight,
477+ 'lw' : lineThickness,
471478 'z' : pages.map ((EditorPage page) => page.toJson (assets)).toList (),
472479 'c' : initialPageIndex,
473480 };
@@ -536,6 +543,7 @@ class EditorCoreInfo {
536543 Color ? backgroundColor,
537544 CanvasBackgroundPattern ? backgroundPattern,
538545 int ? lineHeight,
546+ int ? lineThickness,
539547 QuillController ? quillController,
540548 List <EditorPage >? pages,
541549 }) {
@@ -548,6 +556,7 @@ class EditorCoreInfo {
548556 backgroundColor: backgroundColor ?? this .backgroundColor,
549557 backgroundPattern: backgroundPattern ?? this .backgroundPattern,
550558 lineHeight: lineHeight ?? this .lineHeight,
559+ lineThickness: lineThickness ?? this .lineThickness,
551560 pages: pages ?? this .pages,
552561 initialPageIndex: initialPageIndex,
553562 assetCache: assetCache,
0 commit comments