From 1ae030e946edabd8a0fb204a4981657c8d4e6c81 Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 22 Jul 2022 14:20:51 +0700 Subject: [PATCH] TF-735 Add CodeView type in rich text button --- .../composer/presentation/model/code_view_state.dart | 5 +++++ .../presentation/model/dropdown_menu_font_status.dart | 5 +++++ .../composer/presentation/model/rich_text_style_type.dart | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 lib/features/composer/presentation/model/code_view_state.dart create mode 100644 lib/features/composer/presentation/model/dropdown_menu_font_status.dart diff --git a/lib/features/composer/presentation/model/code_view_state.dart b/lib/features/composer/presentation/model/code_view_state.dart new file mode 100644 index 000000000..f27e8da63 --- /dev/null +++ b/lib/features/composer/presentation/model/code_view_state.dart @@ -0,0 +1,5 @@ + +enum CodeViewState { + enabled, + disabled +} \ No newline at end of file diff --git a/lib/features/composer/presentation/model/dropdown_menu_font_status.dart b/lib/features/composer/presentation/model/dropdown_menu_font_status.dart new file mode 100644 index 000000000..9bb33c254 --- /dev/null +++ b/lib/features/composer/presentation/model/dropdown_menu_font_status.dart @@ -0,0 +1,5 @@ + +enum DropdownMenuFontStatus { + open, + closed +} \ No newline at end of file diff --git a/lib/features/composer/presentation/model/rich_text_style_type.dart b/lib/features/composer/presentation/model/rich_text_style_type.dart index dadb7a89c..607abf9d4 100644 --- a/lib/features/composer/presentation/model/rich_text_style_type.dart +++ b/lib/features/composer/presentation/model/rich_text_style_type.dart @@ -10,7 +10,8 @@ enum RichTextStyleType { underline, strikeThrough, textColor, - textBackgroundColor; + textBackgroundColor, + codeView; String get commandAction { switch (this) { @@ -43,6 +44,8 @@ enum RichTextStyleType { return imagePaths.icStyleUnderline; case strikeThrough: return imagePaths.icStyleStrikeThrough; + case codeView: + return imagePaths.icStyleCodeView; default: return ''; } @@ -73,6 +76,8 @@ enum RichTextStyleType { return AppLocalizations.of(context).formatTextColor; case textBackgroundColor: return AppLocalizations.of(context).formatTextBackgroundColor; + case codeView: + return AppLocalizations.of(context).codeView; default: return ''; }