首页 > 解决方案 > 错误:'AnimatedScale' 是从 /implicit_animations.dart' 和 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart' 导入的

问题描述

我已经升级到颤振 2.5.2 现在在 2 个库中面临这个问题,因为它们是特定于库的,所以无法用作关键字

我无法运行该应用程序

在为 x86 构建的 Android SDK 上以调试模式启动 lib/main.dart...

Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/button.dart:200:14: Error: 'AnimatedScale' is imported from both 'package:flutter/src/widgets/implicit_animations.dart' and 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart'.
      child: AnimatedScale(
             ^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.1.0/lib/src/widget/switch.dart:167:20: Error: 'AnimatedScale' is imported from both 'package:flutter/src/widgets/implicit_animations.dart' and 'package:flutter_neumorphic/src/widget/animation/animated_scale.dart'.
            child: AnimatedScale(
                   ^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script '/Users/flipitnews/Downloads/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/flipitnews/Downloads/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 25s
Exception: Gradle task assembleDebug failed with exit code 1

标签: flutterdart

解决方案


推荐阅读