2017-03-08 8 views
3

AnimatedContainertransformプロパティを使用してコンテナのスケールをアニメートするとします。しかし、スケールは移行されておらず、最初から最後まで直接ジャンプします。アニメーション変換にAnimatedContainerを使用する方法(例:Scale)

コードスニペット:

var container = new AnimatedContainer(
    duration: const Duration(milliseconds: 200), 
    width: 50.0, 
    height: 50.0, 
    // selected is a bool that will be toggled 
    transform: selected ? new Matrix4.identity() : new Matrix4.identity().scaled(0.2,0.2), 
    decoration: new BoxDecoration(
    shape: BoxShape.circle, 
    backgroundColor: Colors.blue[500], 
), 
    child: new Center(
    child: new Icon(
     Icons.check, 
     color: Colors.white, 
    ), 
) 
); 

何が起こっている上の任意の洞察力?

答えて

関連する問題