title: How to set "key" for opacity widget
body: <p>I want use a <code>Opacity</code> widget <strong>child</strong> in a <code>Opacity</code> widget <strong>parent</strong> like this :</p>
  
  <pre><code>class EmptyAlbumArtContainer extends StatelessWidget {
  
  ...
    @override
    Widget build(BuildContext context) {
      return Container(
        color:Colors.red,
        child: Opacity(
          opacity: 1 - animation.value,
          child: Opacity(
            opacity: 0.5,
            child: Container(
              color: Colors.blue
            )
          )
        ),
     );
    }
  }
  ...
  </code></pre>
  
  <p>But the opacity value the father becomes zero , suddenly!!!!
  is this the problem with the key vlaue?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I create a class like <a href="https://pub.dev/packages/sliding_up_panel" rel="nofollow noreferrer">sliding_up_panel</a> library.</p>
  
  <p><a href="https://i.stack.imgur.com/94PHz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/94PHz.png" alt="enter image description here"></a></p>
  
  <p><strong>red</strong> : is parent.</p>
  
  <p><strong>orange</strong> : is only a default album art with below code.
  As move up, the opacity of the red box decreases.</p>
  
  <pre><code>class DefaultAlbumArt extends StatelessWidget{
  
    DefaultAlbumArt({Key key}) : super(key:key);
  
    @override
    Widget build(BuildContext context) {
      return Container(
            decoration: BoxDecoration(
              gradient:  LinearGradient(
                  begin: Alignment.topRight,
                  end: Alignment.bottomLeft,
                  stops: [
                    0.0,
                    0.85
                  ],
                  colors: [
                    Color(0xFF47ACE1),
                    Color(0xFFDF5F9D)
                  ]
              ),
            ),
            child: Center(
              child: Opacity(
                opacity: 0.5,
                child: Icon(
                  Icons.music_note,
                  color: Colors.black87,
                  size: screenAwareSize(context, 40),
                ),
              )
            ),
          );
    }
  }
  </code></pre>