首页 > 解决方案 > 参数类型“AnimationController?” 不能分配给参数类型“Listenable”

问题描述

尝试使用复杂的 ui 树(堆栈、变换和动画)创建动画自定义抽屉。在AnimatedBuilder的动画中使用animatedcontroller时..我得到的错误比animatedcontroller不能分配给可听

  Widget build(BuildContext context) {
    return GestureDetector(
      onHorizontalDragStart: _onDragStart,
      onHorizontalDragUpdate: _onDragUpdate,
      onHorizontalDragEnd: _onDragEnd,
      behavior: HitTestBehavior.translucent,
      onTap: toggle,
      child: AnimatedBuilder(
        animation: animationController, //I am getting error here
        builder: (context, _) {
          return


Here is the code i am using....please help me

标签: flutterflutter-layout

解决方案


推荐阅读