TF-733 Apply change text background color to body composer on web

This commit is contained in:
dab246
2022-07-21 14:50:08 +07:00
committed by Dat H. Pham
parent 50316bfa15
commit a98c646f53
9 changed files with 96 additions and 12 deletions
@@ -121,6 +121,8 @@ extension AppColor on Color {
static const colorButtonCancelDialog = Color(0x0D000000);
static const colorShadowComposerButton = Color(0x99007AFF);
static const colorBackgroundTagFilter = Color(0x6D7885);
static const colorDefaultRichTextButton = Color(0xFF99A2AD);
static const colorFocusRichTextButton = Color(0x146D7885);
static const mapGradientColor = [
[Color(0xFF21D4FD), Color(0xFFB721FF)],
@@ -11,6 +11,7 @@ class ColorPickerDialogBuilder {
final SelectColorActionCallback? setColorActionCallback;
final VoidCallback? cancelActionCallback;
final VoidCallback? resetToDefaultActionCallback;
final BuildContext _context;
final Color defaultColor;
final Color _currentColor;
@@ -31,9 +32,10 @@ class ColorPickerDialogBuilder {
this.textActionResetDefault,
this.defaultColor = Colors.black,
this.setColorActionCallback,
this.cancelActionCallback
this.cancelActionCallback,
this.resetToDefaultActionCallback
}
);
) : _colorSelected = _currentColor;
Future show() async {
await showDialog(context: _context, builder: (BuildContext context) {
@@ -99,7 +101,7 @@ class ColorPickerDialogBuilder {
fontWeight: FontWeight.normal),
bgColor: Colors.white,
borderColor: Colors.black26,
onTap: () => setColorActionCallback?.call(Colors.black)),
onTap: () => resetToDefaultActionCallback?.call()),
buildButtonWrapText(
textActionSetColor ?? '',
radius: 5,