I am trying to make my card transparent in order to show the thing in background.
I had tries to set color property of card to transparent, but it is show gray kind of background with opacity.
I also tries use white color with different opacity, but the result outcome is not pure white color with transparent.
Card(
color: Colors.transparent,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
CardLabelSmall("Current Premix Plan Document"),
Expanded(child: PremixPlanDocList()),
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
onPressed: () async {
homeBloc.retrieveCurrentMrfPremixPlan();
},
child: const Text("Retrieve Premix Plan"),
),
),
],
),
],
),
),
);
other white color but still not white at all
color: Colors.white70,
color: Colors.white54,
color: Colors.white30,
How can I achieve to have a pure white background with transperant?
withOpacity(0), ... you can specify how much opacity you want by using decimal value from 0 to 1, 0 being fully transparent while 1 being fully opaque . Save this answer.
#0000ffff - that is the code that you need for transparent.
try setting the elevation
to 0, it should work
Card(
elevation: 0,
color: Colors.transparent,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
CardLabelSmall("Current Premix Plan Document"),
Expanded(child: PremixPlanDocList()),
Row(
children: <Widget>[
Expanded(
child: RaisedButton(
onPressed: () async {
homeBloc.retrieveCurrentMrfPremixPlan();
},
child: const Text("Retrieve Premix Plan"),
),
),
],
),
],
),
),
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With