Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[feat] improve svg widget api (#3205)
Alex Wallen00ee4be723e5
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_user.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_user.dartindex e5bc7c5626..c46728942f 100644--- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_user.dart+++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_user.dart@@ -86,7 +86,6 @@ class SidebarUser extends StatelessWidget {backgroundColor: Colors.transparent,child: FlowySvg(FlowySvgData('emoji/$iconUrl'),- overrideColor: false,),),),diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dartindex 0730d6f39e..3da7e41ae9 100644--- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart+++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart@@ -318,7 +318,6 @@ class _CurrentIcon extends StatelessWidget {child: FlowySvg(FlowySvgData('emoji/$iconUrl'),size: _iconSize,- overrideColor: false,),),),@@ -389,7 +388,7 @@ class IconOption extends StatelessWidget {borderRadius: Corners.s6Border,hoverColor: Theme.of(context).colorScheme.tertiaryContainer,onTap: () => setIcon(iconUrl),- child: FlowySvg(emoji, size: _iconSize, overrideColor: false),+ child: FlowySvg(emoji, size: _iconSize),);}}diff --git a/frontend/appflowy_flutter/packages/flowy_svg/lib/src/flowy_svg.dart b/frontend/appflowy_flutter/packages/flowy_svg/lib/src/flowy_svg.dartindex 39efc06a2e..a0528d2ca0 100644--- a/frontend/appflowy_flutter/packages/flowy_svg/lib/src/flowy_svg.dart+++ b/frontend/appflowy_flutter/packages/flowy_svg/lib/src/flowy_svg.dart@@ -22,7 +22,7 @@ class FlowySvg extends StatelessWidget {super.key,this.size,this.color,- this.overrideColor = true,+ this.blendMode = BlendMode.srcIn,});/// The data for the flowy svg. Will be generated by the generator in this@@ -39,7 +39,7 @@ class FlowySvg extends StatelessWidget {////// Defaults to true///- final bool overrideColor;+ final BlendMode blendMode;@overrideWidget build(BuildContext context) {@@ -47,8 +47,8 @@ class FlowySvg extends StatelessWidget {final child = SvgPicture.asset(_normalized(),- colorFilter: iconColor != null && overrideColor- ? ColorFilter.mode(iconColor, BlendMode.srcIn)+ colorFilter:+ iconColor != null ? ColorFilter.mode(iconColor, blendMode): null,);