title: Flutter set container colors depends on state
body: <p>i have a problem in my flutter project.</p>
  <p>i have a task list screen and i want to change widget colors when task is completed, like disabled buttons(pale colors) but it can be tapped</p>
  <p>this is my screen:</p>
  <p><a href="https://i.stack.imgur.com/hBr9l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hBr9l.png" alt="enter image description here" /></a></p>
  <p>codes: <a href="https://i.stack.imgur.com/yOGFA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yOGFA.png" alt="enter image description here" /></a></p>
  <p><strong>this is my widget</strong></p>
  <pre><code>  return Container(
      margin: EdgeInsets.only(bottom: 10),
      padding: EdgeInsets.only(left: 15, top: 7, bottom: 7),
      height: GeneralConstants.instance.popupBoxHeight,
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(7),
          color: ColorConstants.instance.mainColor),
      child: InkWell(
        onTap: () {
          print(&quot;${baslik} Clicked&quot;);
        },
        child: Column(
          children: [
            SizedBox(
              height: 25,
              width: double.infinity,
              child: AutoSizeText(
                baslik,
                style: GoogleFonts.oswald(
                    color: ColorConstants.instance.headerColor, fontSize: 18),
              ),
            ),
            Expanded(
              child: IgnorePointer(
                ignoring: true,
                child: ListView(
                  children: [
                    AutoSizeText(
                      govde,
                      style: GoogleFonts.openSans(
                          color: ColorConstants.instance.bodyColor, fontSize: 10),
                    ),
                  ],
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
  </code></pre>