@@ -44,8 +44,8 @@ class SimpleEditor extends StatelessWidget {
44
44
bulletedListItem,
45
45
numberedListItem,
46
46
linkItem,
47
- textColorItem ,
48
- highlightColorItem
47
+ buildTextColorItem () ,
48
+ buildHighlightColorItem ()
49
49
],
50
50
editorState: editorState,
51
51
scrollController: scrollController,
@@ -69,7 +69,7 @@ class SimpleEditor extends StatelessWidget {
69
69
editorState: editorState,
70
70
toolbarItems: [
71
71
textDecorationMobileToolbarItem,
72
- textAndBackgroundColorMobileToolbarItem ,
72
+ buildTextAndBackgroundColorMobileToolbarItem () ,
73
73
headingMobileToolbarItem,
74
74
todoListMobileToolbarItem,
75
75
listMobileToolbarItem,
@@ -78,82 +78,6 @@ class SimpleEditor extends StatelessWidget {
78
78
dividerMobileToolbarItem,
79
79
codeMobileToolbarItem,
80
80
],
81
- textColorOptions: [
82
- ColorOption (
83
- colorHex: Colors .grey.toHex (),
84
- name: AppFlowyEditorLocalizations .current.fontColorGray,
85
- ),
86
- ColorOption (
87
- colorHex: Colors .brown.toHex (),
88
- name: AppFlowyEditorLocalizations .current.fontColorBrown,
89
- ),
90
- ColorOption (
91
- colorHex: Colors .yellow.toHex (),
92
- name: AppFlowyEditorLocalizations .current.fontColorYellow,
93
- ),
94
- ColorOption (
95
- colorHex: Colors .green.toHex (),
96
- name: AppFlowyEditorLocalizations .current.fontColorGreen,
97
- ),
98
- ColorOption (
99
- colorHex: Colors .blue.toHex (),
100
- name: AppFlowyEditorLocalizations .current.fontColorBlue,
101
- ),
102
- ColorOption (
103
- colorHex: Colors .purple.toHex (),
104
- name: AppFlowyEditorLocalizations .current.fontColorPurple,
105
- ),
106
- ColorOption (
107
- colorHex: Colors .pink.toHex (),
108
- name: AppFlowyEditorLocalizations .current.fontColorPink,
109
- ),
110
- ColorOption (
111
- colorHex: Colors .red.toHex (),
112
- name: AppFlowyEditorLocalizations .current.fontColorRed,
113
- ),
114
- ],
115
- backgroundColorOptions: [
116
- ColorOption (
117
- colorHex: Colors .grey.withOpacity (0.3 ).toHex (),
118
- name: AppFlowyEditorLocalizations
119
- .current.backgroundColorGray,
120
- ),
121
- ColorOption (
122
- colorHex: Colors .brown.withOpacity (0.3 ).toHex (),
123
- name: AppFlowyEditorLocalizations
124
- .current.backgroundColorBrown,
125
- ),
126
- ColorOption (
127
- colorHex: Colors .yellow.withOpacity (0.3 ).toHex (),
128
- name: AppFlowyEditorLocalizations
129
- .current.backgroundColorYellow,
130
- ),
131
- ColorOption (
132
- colorHex: Colors .green.withOpacity (0.3 ).toHex (),
133
- name: AppFlowyEditorLocalizations
134
- .current.backgroundColorGreen,
135
- ),
136
- ColorOption (
137
- colorHex: Colors .blue.withOpacity (0.3 ).toHex (),
138
- name: AppFlowyEditorLocalizations
139
- .current.backgroundColorBlue,
140
- ),
141
- ColorOption (
142
- colorHex: Colors .purple.withOpacity (0.3 ).toHex (),
143
- name: AppFlowyEditorLocalizations
144
- .current.backgroundColorPurple,
145
- ),
146
- ColorOption (
147
- colorHex: Colors .pink.withOpacity (0.3 ).toHex (),
148
- name: AppFlowyEditorLocalizations
149
- .current.backgroundColorPink,
150
- ),
151
- ColorOption (
152
- colorHex: Colors .red.withOpacity (0.3 ).toHex (),
153
- name: AppFlowyEditorLocalizations
154
- .current.backgroundColorRed,
155
- ),
156
- ],
157
81
),
158
82
],
159
83
);
0 commit comments