TF-733 Apply change text color to body composer on web
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
enum RichTextStyleType {
|
||||
bold,
|
||||
italic,
|
||||
underline,
|
||||
strikeThrough;
|
||||
strikeThrough,
|
||||
textColor;
|
||||
|
||||
String get commandAction {
|
||||
switch (this) {
|
||||
@@ -17,6 +20,8 @@ enum RichTextStyleType {
|
||||
return 'underline';
|
||||
case strikeThrough:
|
||||
return 'strikeThrough';
|
||||
case textColor:
|
||||
return 'foreColor';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -36,4 +41,30 @@ enum RichTextStyleType {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
IconData? getIconData() {
|
||||
switch (this) {
|
||||
case textColor:
|
||||
return Icons.format_color_text;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String getTooltipButton(BuildContext context) {
|
||||
switch (this) {
|
||||
case bold:
|
||||
return AppLocalizations.of(context).formatBold;
|
||||
case italic:
|
||||
return AppLocalizations.of(context).formatItalic;
|
||||
case underline:
|
||||
return AppLocalizations.of(context).formatUnderline;
|
||||
case strikeThrough:
|
||||
return AppLocalizations.of(context).formatStrikethrough;
|
||||
case textColor:
|
||||
return AppLocalizations.of(context).formatTextColor;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user