myfatoorah_flutter import package fails build

Viewed 167

I have added myfatoorah_flutter package version 1.0.7 and in file I have imported the package as import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; it fails the build and gives the following error

../../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/myfatoorah_flutter-1.0.7/lib/myfatoorah_flutter.dart:609:31: Error: The argument type 'bool Function(bool)' can't be assigned to the parameter type 'bool Function(bool, RouteInfo)'.
- 'RouteInfo' is from 'package:back_button_interceptor/src/back_button_interceptor.dart'


('../../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/back_button_interceptor-4.3.1/lib/src/back_button_interceptor.dart').
    BackButtonInterceptor.add(myInterceptor);

I have tried following solutions and none of them worked:

  1. changed version of myfatoorah_flutter
  2. switched between channels dev/stable
  3. upgraded flutter sdk
  4. settings.gradle removed and added again

when I remove import line, it works fine, help is required so that I can integrate the payment methods

1 Answers

I am also getting the same error as I tried this way and worked for me.

change version of back_button_interceptor to back_button_interceptor: 4.0.2 in myfatoorah_flutter's pubspec.ymal.

Related