Reputation: 47
I'm using the razorpay_flutter plugin in my Flutter project, but when I try to build the app, I get the following error:
error: cannot find symbol
import io.flutter.plugin.common.PluginRegistry.Registrar;
^
symbol: class Registrar
location: interface PluginRegistry
It seems that Registrar is no longer supported in newer Flutter versions (I'm using Flutter 3.29.0). I've tried updating the plugin and modifying the code, but the issue persists.
How can I fix this error and make the plugin compatible with the latest Flutter version?
I tried the following to fix the issue:
razorpay_flutter
to 1.3.9, but it is not available yet.flutter clean
and flutter pub get
, but the issue persisted.Registrar
.Registrar
with FlutterPlugin
, but it caused more errors.I expected the project to build successfully after updating dependencies or making changes, but the error still appears. How can I resolve this in Flutter 3.29.0?
Upvotes: 2
Views: 82
Reputation: 121
New package version has been released: https://pub.dev/packages/razorpay_flutter/changelog
You can fix it by upgrading the package version to v1.4.0
Upvotes: 3
Reputation: 51
It looks like the official package hasn’t been updated for Flutter v2 Android embedding yet. As a workaround, you can use this fork:
razorpay_flutter:
git:
url: https://github.com/nikb7/razorpay-flutter.git
ref: fluuter-v1-embedding
This should work until the package maintainers update the official version. Hope that helps!
Upvotes: 2