-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import 'dart:js'; error #130
Comments
same problem i am facing.if you find any idea how to correct this please let me know |
Use this for now, the recent updates to this package on its pub.dev deployment has issues so until it's fixed this will work.
|
Thanks for helping us out. |
Perhaps worth not closing the issue till its resolved properly. |
Error output from Xcode build: Xcode's output:
|
I'm getting the same error: razorpay_flutter.dart:1:8: Error: Not found: 'dart:js' |
razorpay_flutter: add this in your pubsec mine problem is solved if cannot work for you razorpay_flutter: |
@MeTubeapp why I'm getting this error xcode 11.3.1
razorpay_flutter: |
@MeTubeapp I am still facing the same error as @LOG-TAG mentioned in an above comment. |
Same issue after updating to razorpay_flutter: ^1.2.4 |
Please upvote the original issue if you'd like it to be fixed. |
paste this code in your razorpay_flutter.dart import 'package:flutter/services.dart'; import 'package:eventify/eventify.dart'; class Razorpay { // Event names // Payment error codes static const MethodChannel _channel = const MethodChannel('razorpay_flutter'); // EventEmitter instance used for communication Razorpay() { /// Opens Razorpay checkout
} /// Handles checkout response from platform
} /// Registers event listeners for payment events /// Clears all event listeners /// Retrieves lost responses from platform /// Validate payment options class PaymentSuccessResponse { PaymentSuccessResponse(this.paymentId, this.orderId, this.signature); static PaymentSuccessResponse fromMap(Map<dynamic, dynamic> map) {
} class PaymentFailureResponse { PaymentFailureResponse(this.code, this.message); static PaymentFailureResponse fromMap(Map<dynamic, dynamic> map) { class ExternalWalletResponse { ExternalWalletResponse(this.walletName); static ExternalWalletResponse fromMap(Map<dynamic, dynamic> map) { |
Fixing razorpay-flutter to 1.2.3 worked for me. |
Hi everyone, I would ask you guys to update to the latest plugin, we have rolled out some fixes. Also I would suggest you to update your cocoa pods so that you can get the latest Razorpay frameworks. |
I have used the latest one only it was causing the above issue .. temporary solution is also given above #130 (comment) |
First time when i used latest version i m also faced import js problem. then after i done some manual work like goto the flutter.pub-cache\hosted\pub.dartlang.org path and delete the latest version file [ razorpay_flutter-1.2.4 ]. and then i used flutter clean command.and again run my app without the razorpay package because of confirmation like my app project is work or not if i am not used razorpay package.and remove razorpay related code for temporarily. after confirmation i used razorpay package from git by used these. if this not work please make a new project and again used razorpay package bt add these lines razorpay_flutter: after this procedure my app is working fine with latest razorpay package . notei make app only for android not for ios. i dont know this solution work for ios . i hope this work for all. Jai Shree Ram. |
Description
import 'dart:js';
.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.4/lib/razorpay_flutter.dart:1:8: Error: Not found: 'dart:js'
Flutter Version :
1.22.6
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
1.install razorpay-flutter and do flutter pub get
2.start flutter run
Expected Results
/C:/SDKs/flutters/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.4/lib/razorpay_flutter.dart:1:8: Error: Not found: 'dart:js'
import 'dart:js';
^
/C:/SDKs/flutters/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.2.4/lib/razorpay_flutter.dart:91:29: Error: The getter 'context' isn't defined for the class 'Razorpay'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'context'.
_eventEmitter.on(event, context, cb);
^^^^^^^
U
nhandled exception:
FileSystemException(uri=org-dartlang-un
translatable-uri:dart%3Ajs; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
Initial release #1 asFileUri (package:vm/kernel_front_end.dart:657:37)
Update commit hash for v1.0.0-alpha #2 writeDepfile (package:vm/kernel_front_end.dart:825:21)
FAILURE: Build failed with an exception.
Where:
Script 'C:\SDKs\flutters\packages\flutter_tools\gradle\flutter.gradle' line: 904
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
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 18s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 19.0s
Exception: Gradle task assembleDebug failed with exit code 1
Flutter Doctor -v
D:\fad>flutters doctor -v
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.804], locale en-IN)
• Flutter version 1.22.6 at C:\SDKs\flutters
• Framework revision 9b2d32b605 (4 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\sambitraze\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:\Users\sambitraze\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[!] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.53.2)
• VS Code at C:\Users\sambitraze\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.19.0
[√] Connected device (1 available)
• Redmi Note 8 Pro (mobile) • 192.168.1.101:5555 • android-arm64 • Android 10 (API 29)
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered: