Skylled/expansion_tile_card

Header Color

Closed this issue · 8 comments

Hey man, thanks for sharing this components with us.
its possible make a header on a Card ?

Could you maybe give a quick example of what you have in mind? Even a rough sketch would be helpful.

I see in the Material spec for Cards there's the option to do header text. If that's what you have in mind, you could probably customize the widget you set as the title to be what you need.

Thanks for response, I was thinking in set a color on a head Color.
the way we have now, the card title dont have backgroundcolor..
ExpansionTileCard(
child : Text(" My header")
backgroundheader: Colors.red.

so, would be awessome put color on an header.. or title on ExpansionTileCard

i can use like this.
ExpansionTileCard(
initiallyExpanded: false,
elevation: 1,
key: GlobalKey(),
title: Container(
color: Colors.grey.shade100,
child: Text(

but the color dont fit all the header, 

I'm not 100% sure I'm understanding what you're looking for, but I think something close to this will be covered by #6, which I'm looking to address very soon.

There's not a lot of control offered for the "upper" portion of the ExpansionTileCard (the part that is visible when not expanded), which is in-part due to its usage of ListTile, which is not something I wish to change.

However, you should have a decent amount of control over the "lower" portion of the card, through the children variable.

Perhaps, once #6 is closed, you could set the widget's color to be the "header" color you're looking for, and control the lower portion's color manually. I'll see how plausible this is soon.

Ok, thanks ,

So, with version 1.0.3 (now available on Pub), I made this example of what I think you're looking for.

There's probably a dozen ways to do this, but this is the first one that came to mind.

  expandedTileColor: Colors.lightBlue[50],
  children: [
    Material(
      color: Colors.white, // Or whatever color you prefer.
      child: Column(
        children: [
          // Your usual widgets here.
        ]
      ),
    ),
  ],
)

Here's how it came out. (Mind the blurriness. Chromebook being wonky with Flutter Web.)

Example

nice man. that it I'm talk about.
thanks!

Fantastic! Glad to help. Not gonna lie, if done with the right colors, I think that can look pretty good. Good luck!