2
votes

Hi everyone my app was work will before two to days today when I run my app it gives me that following error : /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/modal_bottom_sheet-0.2.0+1/lib/src/bottom_sheet.dart:295:43: Error: Too few positional arguments: 1 required, 0 given. _velocityTracker = VelocityTracker(); ^ /C:/src/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:152:3: Context: Found this candidate, but the arguments don't match. VelocityTracker(this.kind); ^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/fade_scale_transition.dart:148:29: Error: 'decelerateEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: decelerateEasing)); ^^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:315:12: Error: 'decelerateEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. curve: decelerateEasing, ^^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:321:29: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:326:29: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:335:35: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:355:35: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:402:12: Error: 'accelerateEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. curve: accelerateEasing, ^^^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:408:29: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:413:29: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:422:35: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/animations-1.1.1/lib/src/shared_axis_transition.dart:445:35: Error: 'standardEasing' is imported from both 'package:flutter/src/material/curves.dart' and 'package:animations/src/utils/curves.dart'. ).chain(CurveTween(curve: standardEasing)); ^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' 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 27s Exception: Gradle task assembleDebug failed with exit code 1

I don't understand why this error is appear and how I fixed It . any suggestions will appreciated

1
It seems to be a bug: github.com/jamesblasco/modal_bottom_sheet/issues/69. As a (temporary) workaround, you could downgrade flutter. - alecsam

1 Answers

2
votes

Open this file which is giving error:

C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/modal_bottom_sheet-0.2.0+1/lib/src/bottom_sheet.dart:295:43:

At line 295 fix the error by changing:

_velocityTracker = VelocityTracker();

into

_velocityTracker = VelocityTracker(PointerDeviceKind.touch);

This is a temporary work around. The issue will be fixed in next beta release.