TF-61 Add RichTextStyleType object

This commit is contained in:
dab246
2022-07-18 13:45:21 +07:00
committed by Dat H. Pham
parent 1d2ba65fa6
commit 35b47679c0
@@ -0,0 +1,34 @@
import 'package:core/presentation/resources/image_paths.dart';
enum RichTextStyleType {
bold,
italic,
underline;
String get commandAction {
switch (this) {
case bold:
return 'bold';
case italic:
return 'italic';
case underline:
return 'underline';
default:
return '';
}
}
String getIcon(ImagePaths imagePaths) {
switch (this) {
case bold:
return imagePaths.icStyleBold;
case italic:
return imagePaths.icStyleItalic;
case underline:
return imagePaths.icStyleUnderline;
default:
return '';
}
}
}