jonataslaw / getx

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
MIT License
10.34k stars 1.62k forks source link

Error: Too few positional arguments: 6 required, 5 given. #2841

Open jsloop42 opened 1 year ago

jsloop42 commented 1 year ago

Describe the bug I am using Microsoft App Center to build iOS and Android Flutter apps. The build was working fine before which was triggered on a commit. When I triggered a manual build the iOS build failed with below error message.

Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
##[warning]Build agent connection lost
Running Xcode build...                                          
Xcode build done.                                           185.3s
Failed to build iOS app
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/routes/get_transition_mixin.dart:608:57: Error: Too few positional arguments: 6 required, 5 given.

Encountered error while building for device.
##[error]The process '/bin/bash' failed with exit code 1
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 1

Reproduction code The bug is caused from this piece of code:

case Transition.cupertino:
  return CupertinoPageTransition(
      primaryRouteAnimation: animation,
      secondaryRouteAnimation: secondaryAnimation,
      linearTransition: linearTransition,
      child: GetBackGestureDetector<T>(
        popGestureEnable: () =>
            _isPopGestureEnabled(route, canSwipe(route), context),
        onStartPopGesture: () {
          assert(_isPopGestureEnabled(route, canSwipe(route), context));
          return _startPopGesture(route);
        },
        limitedSwipe: limitedSwipe,
        gestureWidth:
            route.gestureWidth?.call(context) ?? _kBackGestureWidth,
        initialOffset: initialOffset,
        child: child,
      ));

To Reproduce Steps to reproduce the behavior:

  1. Trigger a build
  2. Build fails with the above mentioned error

Expected behavior The build should succeed without error.

Screenshots N/A

Flutter Version: Flutter 3.10.1 • channel stable •

Getx Version: 4.6.5

Describe on which device you found the bug: The build is failing. Not able to test on device.

Minimal reproduce code The library is used by accordion 2.5.1 with a transitive dependency.

exonent commented 1 year ago

Same here!

Error (Xcode): ../../../.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/routes/get_transition_mixin.dart:608:57: Error: Too few positional arguments: 6 required, 5 given.

flutter doctor -v Macbook Pro 2 Max [✓] Flutter (Channel master, 3.12.0-14.0.pre.40, on macOS 13.4.1 22F82 darwin-arm64, locale es-ES) • Flutter version 3.12.0-14.0.pre.40 on channel master at /Users/exonent/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e1702a96f6 (hace 21 horas), 2023-07-05 12:26:24 -0700 • Engine revision bd2e42b203 • Dart version 3.1.0 (build 3.1.0-262.0.dev) • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/exonent/Library/Android/sdk • Platform android-33, build-tools 33.0.0-rc4 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.79.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.68.0

[✓] Connected device (3 available) • iPhone 14 Pro Max (mobile) • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.4.1 22F82 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82

[✓] Network resources • All expected network resources are available.

• No issues found!