TF-736 Add header style inside rich text button
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.5 2.672a.5.5 0 1 0 1 0V.843a.5.5 0 0 0-1 0v1.829Zm4.5.035A.5.5 0 0 0 13.293 2L12 3.293a.5.5 0 1 0 .707.707L14 2.707ZM7.293 4A.5.5 0 1 0 8 3.293L6.707 2A.5.5 0 0 0 6 2.707L7.293 4Zm-.621 2.5a.5.5 0 1 0 0-1H4.843a.5.5 0 1 0 0 1h1.829Zm8.485 0a.5.5 0 1 0 0-1h-1.829a.5.5 0 0 0 0 1h1.829ZM13.293 10A.5.5 0 1 0 14 9.293L12.707 8a.5.5 0 1 0-.707.707L13.293 10ZM9.5 11.157a.5.5 0 0 0 1 0V9.328a.5.5 0 0 0-1 0v1.829Zm1.854-5.097a.5.5 0 0 0 0-.706l-.708-.708a.5.5 0 0 0-.707 0L8.646 5.94a.5.5 0 0 0 0 .707l.708.708a.5.5 0 0 0 .707 0l1.293-1.293Zm-3 3a.5.5 0 0 0 0-.706l-.708-.708a.5.5 0 0 0-.707 0L.646 13.94a.5.5 0 0 0 0 .707l.708.708a.5.5 0 0 0 .707 0L8.354 9.06Z" fill="#99A2AD"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 791 B |
@@ -134,6 +134,7 @@ class ImagePaths {
|
|||||||
String get icInsertImage => _getImagePath('ic_insert_image.svg');
|
String get icInsertImage => _getImagePath('ic_insert_image.svg');
|
||||||
String get icStyleStrikeThrough => _getImagePath('ic_style_strikethrough.svg');
|
String get icStyleStrikeThrough => _getImagePath('ic_style_strikethrough.svg');
|
||||||
String get icStyleCodeView => _getImagePath('ic_style_code_view.svg');
|
String get icStyleCodeView => _getImagePath('ic_style_code_view.svg');
|
||||||
|
String get icStyleHeader => _getImagePath('ic_style_header.svg');
|
||||||
|
|
||||||
String _getImagePath(String imageName) {
|
String _getImagePath(String imageName) {
|
||||||
return AssetsPaths.images + imageName;
|
return AssetsPaths.images + imageName;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
enum RichTextStyleType {
|
enum RichTextStyleType {
|
||||||
|
headerStyle,
|
||||||
fontName,
|
fontName,
|
||||||
bold,
|
bold,
|
||||||
italic,
|
italic,
|
||||||
@@ -15,6 +16,8 @@ enum RichTextStyleType {
|
|||||||
|
|
||||||
String get commandAction {
|
String get commandAction {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
|
case headerStyle:
|
||||||
|
return 'formatBlock';
|
||||||
case fontName:
|
case fontName:
|
||||||
return 'fontName';
|
return 'fontName';
|
||||||
case bold:
|
case bold:
|
||||||
@@ -46,6 +49,8 @@ enum RichTextStyleType {
|
|||||||
return imagePaths.icStyleStrikeThrough;
|
return imagePaths.icStyleStrikeThrough;
|
||||||
case codeView:
|
case codeView:
|
||||||
return imagePaths.icStyleCodeView;
|
return imagePaths.icStyleCodeView;
|
||||||
|
case headerStyle:
|
||||||
|
return imagePaths.icStyleHeader;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -78,6 +83,8 @@ enum RichTextStyleType {
|
|||||||
return AppLocalizations.of(context).formatTextBackgroundColor;
|
return AppLocalizations.of(context).formatTextBackgroundColor;
|
||||||
case codeView:
|
case codeView:
|
||||||
return AppLocalizations.of(context).codeView;
|
return AppLocalizations.of(context).codeView;
|
||||||
|
case headerStyle:
|
||||||
|
return AppLocalizations.of(context).headerStyle;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -1675,5 +1675,11 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"headerStyle": "Style",
|
||||||
|
"@headerStyle": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [],
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1719,4 +1719,10 @@ class AppLocalizations {
|
|||||||
'Code view',
|
'Code view',
|
||||||
name: 'codeView');
|
name: 'codeView');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get headerStyle {
|
||||||
|
return Intl.message(
|
||||||
|
'Style',
|
||||||
|
name: 'headerStyle');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user