chore: set icon color of the app ation panel

This commit is contained in:
appflowy 2022-09-23 18:00:11 +08:00
parent 77d1dbedd6
commit f990e3cabb
2 changed files with 6 additions and 5 deletions

View File

@ -86,7 +86,8 @@ class MenuAppHeader extends StatelessWidget {
?.toggle(),
onSecondaryTap: () {
final actionList = AppDisclosureActionSheet(
onSelected: (action) => _handleAction(context, action));
onSelected: (action) => _handleAction(context, action),
);
actionList.show(
context,
anchorDirection: AnchorDirection.bottomWithCenterAligned,
@ -158,12 +159,12 @@ extension AppDisclosureExtension on AppDisclosureAction {
}
}
Widget get icon {
Widget icon(Color iconColor) {
switch (this) {
case AppDisclosureAction.rename:
return svgWidget('editor/edit', color: const Color(0xffe5e5e5));
return svgWidget('editor/edit', color: iconColor);
case AppDisclosureAction.delete:
return svgWidget('editor/delete', color: const Color(0xffe5e5e5));
return svgWidget('editor/delete', color: iconColor);
}
}
}

View File

@ -44,7 +44,7 @@ class DisclosureActionWrapper extends ActionItem {
DisclosureActionWrapper(this.inner);
@override
Widget? icon(Color iconColor) => inner.icon;
Widget? icon(Color iconColor) => inner.icon(iconColor);
@override
String get name => inner.name;