TF-736 Add header style inside rich text button

This commit is contained in:
dab246
2022-07-22 18:38:15 +07:00
committed by Dat H. Pham
parent 3cbf656d50
commit f5aaf2b344
5 changed files with 24 additions and 1 deletions
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
enum RichTextStyleType {
headerStyle,
fontName,
bold,
italic,
@@ -15,6 +16,8 @@ enum RichTextStyleType {
String get commandAction {
switch (this) {
case headerStyle:
return 'formatBlock';
case fontName:
return 'fontName';
case bold:
@@ -46,6 +49,8 @@ enum RichTextStyleType {
return imagePaths.icStyleStrikeThrough;
case codeView:
return imagePaths.icStyleCodeView;
case headerStyle:
return imagePaths.icStyleHeader;
default:
return '';
}
@@ -78,6 +83,8 @@ enum RichTextStyleType {
return AppLocalizations.of(context).formatTextBackgroundColor;
case codeView:
return AppLocalizations.of(context).codeView;
case headerStyle:
return AppLocalizations.of(context).headerStyle;
default:
return '';
}
+7 -1
View File
@@ -1,5 +1,5 @@
{
"@@last_modified": "2022-07-22T14:15:06.629292",
"@@last_modified": "2022-07-22T18:31:58.383010",
"initializing_data": "Initializing data...",
"@initializing_data": {
"type": "text",
@@ -1675,5 +1675,11 @@
"type": "text",
"placeholders_order": [],
"placeholders": {}
},
"headerStyle": "Style",
"@headerStyle": {
"type": "text",
"placeholders_order": [],
"placeholders": {}
}
}
@@ -1719,4 +1719,10 @@ class AppLocalizations {
'Code view',
name: 'codeView');
}
String get headerStyle {
return Intl.message(
'Style',
name: 'headerStyle');
}
}