TF-735 Add CodeView type in rich text button

This commit is contained in:
dab246
2022-07-22 14:20:51 +07:00
committed by Dat H. Pham
parent 87a3bebda4
commit 1ae030e946
3 changed files with 16 additions and 1 deletions
@@ -0,0 +1,5 @@
enum CodeViewState {
enabled,
disabled
}
@@ -0,0 +1,5 @@
enum DropdownMenuFontStatus {
open,
closed
}
@@ -10,7 +10,8 @@ enum RichTextStyleType {
underline, underline,
strikeThrough, strikeThrough,
textColor, textColor,
textBackgroundColor; textBackgroundColor,
codeView;
String get commandAction { String get commandAction {
switch (this) { switch (this) {
@@ -43,6 +44,8 @@ enum RichTextStyleType {
return imagePaths.icStyleUnderline; return imagePaths.icStyleUnderline;
case strikeThrough: case strikeThrough:
return imagePaths.icStyleStrikeThrough; return imagePaths.icStyleStrikeThrough;
case codeView:
return imagePaths.icStyleCodeView;
default: default:
return ''; return '';
} }
@@ -73,6 +76,8 @@ enum RichTextStyleType {
return AppLocalizations.of(context).formatTextColor; return AppLocalizations.of(context).formatTextColor;
case textBackgroundColor: case textBackgroundColor:
return AppLocalizations.of(context).formatTextBackgroundColor; return AppLocalizations.of(context).formatTextBackgroundColor;
case codeView:
return AppLocalizations.of(context).codeView;
default: default:
return ''; return '';
} }