TF-733 Apply change font to body composer on web

This commit is contained in:
dab246
2022-07-21 15:41:59 +07:00
committed by Dat H. Pham
parent a98c646f53
commit ea64fe82e0
10 changed files with 213 additions and 133 deletions
@@ -0,0 +1,50 @@
enum FontNameType {
arial,
arialBlack,
brushScriptMT,
comicSansMS,
courierNew,
helveticaNeue,
helvetica,
impact,
lucidaGrande,
tahoma,
timesNewRoman,
trebuchetMS,
sansSerif,
verdana;
String get fontFamily {
switch(this) {
case FontNameType.arial:
return 'Arial';
case FontNameType.arialBlack:
return 'Arial Black';
case FontNameType.brushScriptMT:
return 'Brush Script MT';
case FontNameType.comicSansMS:
return 'Comic Sans MS';
case FontNameType.courierNew:
return 'Courier New';
case FontNameType.helveticaNeue:
return 'Helvetica Neue';
case FontNameType.helvetica:
return 'Helvetica';
case FontNameType.impact:
return 'Impact';
case FontNameType.lucidaGrande:
return 'Lucida Grande';
case FontNameType.tahoma:
return 'Tahoma';
case FontNameType.timesNewRoman:
return 'Times New Roman';
case FontNameType.trebuchetMS:
return 'Trebuchet MS';
case FontNameType.sansSerif:
return 'Sans Serif';
case FontNameType.verdana:
return 'Verdana';
}
}
}
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
enum RichTextStyleType {
fontName,
bold,
italic,
underline,
@@ -13,6 +14,8 @@ enum RichTextStyleType {
String get commandAction {
switch (this) {
case fontName:
return 'fontName';
case bold:
return 'bold';
case italic: