Optimize and refactor for MailboxVisibility
This commit is contained in:
@@ -175,6 +175,8 @@ extension AppColor on Color {
|
||||
static const colorBackgroundSearchMailboxInput = Color(0xFFEBEDF0);
|
||||
static const colorMailboxHovered = Color(0xFFEBEDF0);
|
||||
static const colorMailboxPath = Color(0xFF818C99);
|
||||
static const colorIconUnSubscribedMailbox = Color(0xFFAEB7C2);
|
||||
static const colorTitleAUnSubscribedMailbox = Color(0xFF818C99);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -57,6 +57,7 @@ class TreeViewChild {
|
||||
final Widget parent;
|
||||
final List<Widget> children;
|
||||
final VoidCallback? onTap;
|
||||
final EdgeInsets? paddingChild;
|
||||
|
||||
TreeViewChild(
|
||||
this.context,
|
||||
@@ -65,6 +66,7 @@ class TreeViewChild {
|
||||
required this.children,
|
||||
this.isExpanded,
|
||||
this.onTap,
|
||||
this.paddingChild,
|
||||
Key? key,
|
||||
}
|
||||
);
|
||||
@@ -86,7 +88,13 @@ class TreeViewChild {
|
||||
child: isExpanded!
|
||||
? Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: children.map((child) => Padding(padding: const EdgeInsets.only(left: 20), child: child)).toList())
|
||||
children: children
|
||||
.map((child) => Padding(
|
||||
padding: paddingChild ?? const EdgeInsets.only(left: 20),
|
||||
child: child
|
||||
))
|
||||
.toList()
|
||||
)
|
||||
: const Offstage(),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user