flutterwave / flutter-v3 Goto Github PK
View Code? Open in Web Editor NEWFlutter library for Flutterwave for Business (F4B) v3 APIs.
Home Page: https://developer.flutterwave.com/
License: MIT License
Flutter library for Flutterwave for Business (F4B) v3 APIs.
Home Page: https://developer.flutterwave.com/
License: MIT License
On Android, in some instances, I get the
The webpage at https://ravemodal-dev.herokuapp.com/... could not be loaded because:
net::ERR_NAME_NOT_RESOLVED
final flCustomer = fl.Customer(
name: customer.username.toString(),
phoneNumber: customer.phoneNumber.toString(),
email: customer.email.toString(),
);
final flutterwave = fl.Flutterwave(
context: context,
publicKey: '<public-key-here>',
currency: 'NGN',
redirectUrl: '<app-url-here>',
txRef: '<app-name_purchase_${orderId}_${order.customerId}>',
amount: order.totalPrice.toString(),
customer: flCustomer,
paymentOptions: "ussd, card, barter, nqr",
customization: fl.Customization(
title: '<title-here>',
description: '<description>',
),
isTestMode: !true,
);
final response = await flutterwave.charge();
Actual behaviour:
The output should be the checkout page
flutter doctor -v
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4 22F66 darwin-arm64, locale en-NG)
• Flutter version 3.10.6 on channel stable at /Users/my-user/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f468f3366c (6 weeks ago), 2023-07-12 15:19:05 -0700
• Engine revision cdbeda788a
• Dart version 3.0.6
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/my-user/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_SDK_ROOT = /Users/my-user/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14A400
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• 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 11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.81.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.70.0
[✓] Connected device (4 available)
• TECNO CI6 (mobile) • adb-085452527M005247-7kdqxq._adb-tls-connect._tcp. • android-arm64 • Android 12 (API 31)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 32) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.61
[✓] Network resources
• All expected network resources are available.
I want my app to process other currency apart from Naira
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect
Do you want to ask a question? Are you looking for support? The developer slack is the best place for getting support
Expected behaviour:
Actual behaviour:
Reproduces how often:
Is this project still being worked on or its an abandoned project it seems no one from the authors is willing to attend to queries so as we can work together. anybody its been weeks of waiting now , the payment widget for me is the big problem we cannot have an entire page with just one button no, user experience is compromised that way as reference here
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect
Do you want to ask a question? Are you looking for support? The developer slack is the best place for getting support
Expected behaviour:
Actual behaviour:
Reproduces how often:
Pay with bank doesn't return ChargeResponse it just redirects to the redirect url and after closing gives a canceled response with null ID and Ref; "{status: canceled, success: false, transaction_id: null, tx_ref: null}"
so I cant even run a callback to verify the transaction.
Also disabling payment with bank transfer doesn't work
Expected behaviour:
should return a charge response with the transaction ref and ID
Actual behaviour:
Just redirects to the redirect url and returns {status: canceled, success: false, transaction_id: null, tx_ref: null} when closed
Reproduces how often:
Everytime
When I try initialize a payment, I get this error
Error message:
FormatException: Unexpected character (at character 1)
Source:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
To recreate the error, us this config for initialization
final Flutterwave flutterwave = Flutterwave(
context: context,
style: style,
publicKey: getPublicKey(),
currency: currency,
redirectUrl: "https://google.com",
txRef: const Uuid().v1(),
amount: amountController.text,
customer: customer,
// subAccounts: subAccounts,
//paymentOptions: "card, payattitude, barter",
paymentOptions: "card",
customization: Customization(title: "Test Payment"),
isTestMode: isTestMode);
final ChargeResponse response = await flutterwave.charge();
Every time I press on the UI to enter my credit card information, the UI reloads. In All of the input fields.
Expected behaviour:
The inputs to accept data being typed
Actual behaviour:
The page reloads each time i press the any input field
Reproduces how often:
Every time
Using the flutterwave Flutter package, the webview that shows up to complete the payment is blank.
Expected behaviour:
Webview should load a webpage for a user to complete their payment. In particular this link shows a blank page https://ravemodal-dev.herokuapp.com/v3/hosted/pay
Actual behaviour:
A blank page is shown in the webview. I've attached an image for reference.
Customization of the payment does not reflect in flutterwave payment page. For example, the appbar title still shows flutterwave payment and the merchant logo does not showup.
Expected behaviour:
This should work like the previous FlutterwaveStyle
but it does not apply any styling
Actual behaviour:
styling are not implemented
Reproduces how often:
This happens all the time in the current version of `flutterwave_standard: 1.0.8'
The package doesn't support web and Uganda Mobile money
Unable to cancel (Close the checkout screen on iOS).
Expected behaviour:
Should be able to cancel without having to close the app.
Actual behaviour:
Now it's not allowing to close the payment sheet.
Reproduces how often:
100% (anytime in iOS).
I tried making test payment with the flutterwave_standard package. But the flutterwave checkout screen keeps showing blank white screen
`Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 4.1s
Failed to build iOS app
Error output from Xcode build:
↳
2022-10-25 14:15:44.059 xcodebuild[54003:9915111] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
2022-10-25 14:15:44.059 xcodebuild[54003:9915111] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/_6/xqc5vz311qz_5mm6whbxz_v00000gp/T/flutter_tools.hNkkkn/flutter_ios_build_temp_dirCTvsKh/temporary_xcresult_bundle
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift:565:13: warning: setter for 'statusBarStyle' was deprecated in iOS 9.0: Use -[UIViewController
preferredStatusBarStyle]
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
^
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift:565:13: warning: setter for 'statusBarStyle' was deprecated in iOS 9.0: Use -[UIViewController
preferredStatusBarStyle]
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/binemmanuel/Projects/gasport/frontend/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in
target 'Toast' from project 'Pods')
/Users/binemmanuel/Projects/gasport/frontend/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in
target 'OrderedSet' from project 'Pods')
/Users/binemmanuel/Projects/gasport/frontend/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in
target 'FMDB' from project 'Pods')
Result bundle written to path:
/var/folders/_6/xqc5vz311qz_5mm6whbxz_v00000gp/T/flutter_tools.hNkkkn/flutter_ios_build_temp_dirCTvsKh/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:259:43
Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Users/binemmanuel/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:293:43
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.`
Hi there,
I've recently adopted this new Flutterwave Flutter plugin. I followed the guide to a tee but I keep on getting this error:
package:flutterwave_standard/core/navigation_controller.dart:29:7
Now, I noticed that according to the example guide, the PUBLIC_KEY
when the environment is in test mode should be prefixed with FLWPUBK_TEST-
, which I did, but still get the error I listed above.
Furthermore, the dialog that shows up as confirmation when prompting the user to confirm their transaction is never actually unmounted which leads to another error:
Looking up a deactivated widget's ancestor is unsafe.
Any help with this would truly be appreciated.
Code from my payment service below:
Future<void> showLoading(String message) {
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
content: Container(
margin: EdgeInsets.fromLTRB(30, 20, 30, 20),
width: double.infinity,
height: 150,
child: Column(
children: [
Text(message),
],
),
),
);
},
);
}
final style = FlutterwaveStyle(
appBarText: "Make a deposit",
buttonColor: Color(0xffd0ebff),
appBarIcon: Icon(LineIcons.comments, color: Color(0xffd0ebff)),
buttonTextStyle: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18,
),
appBarColor: Color(0xffd0ebff),
dialogCancelTextStyle: TextStyle(
color: Colors.redAccent,
fontSize: 18,
),
dialogContinueTextStyle: TextStyle(
color: Colors.blue,
fontSize: 18,
));
final Customer customer = Customer(
name: _user.fullName,
phoneNumber: phoneNumber,
email: _user.email,
);
final Flutterwave flutterwave = Flutterwave(
context: context,
style: style,
publicKey: "FLWPUBK_TEST-436daa9fb5cbbbd422a2584b62a12bed-X",
currency: "RWF",
txRef: transactionRef,
amount: amount,
customer: customer,
paymentOptions: "mobilemoneyrwanda, card",
customization: Customization(
title: "Wallet Deposit",
logo: "assets/images/Tick.png",
description: "Deposit Into Wallet",
),
isTestMode: true,
redirectUrl: "https://www.google.com",
);
final ChargeResponse response = await flutterwave.charge();
if (response != null) {
print("${response.toJson()}");
showLoading(response.status);
if (response.success) {
// Call the verify transaction endpoint with the transactionID returned in `response.transactionId` to verify transaction before offering value to customer
} else {
// Transaction not successful
throw new Exception('Unable to complete the transaction.');
}
} else {
showLoading("No Response!");
}
Specifying the payment option does not seem to have any effect. The user is still be being presented with a button that says change payment button
How do i disable the button.
Can't use the new flutterwave pluggin am getting the error when calling the the
final Flutterwave flutterwave = Flutterwave(
context: context,
style: style,
publicKey: "Public Key",
currency: "RWF",
redirectUrl: "my_redirect_url",
txRef: "unique_transaction_reference",
amount: "3000",
customer: customer,
paymentOptions: "ussd, card, barter, payattitude",
customization: Customization(title: "Test Payment"),
isDebug: true);
it says flutter wave doesn't have unamend constructor i dont know which package to import for this error to go
Have you read our Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect
Do you want to ask a question? Are you looking for support? The developer slack is the best place for getting support
Expected behaviour:
Actual behaviour:
Reproduces how often:
You depend on modal_bottom_sheet
which conflicts with flutter 3.7.0
, the package version needs to be updated.
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:102:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'
The modal_bottom_sheet
is not updated yet (It is updated on the Prerelease version), So keep watching...
MissingPluginException (MissingPluginException(No implementation found for method open on channel com.pichillilorenzo/flutter_inappbrowser))
When i initialize the package and draw the UI as per the docs, it shows only a make payment button without any other option on whether to pay using a card, ussd or anything else. Upon clicking this button the above error is triggered.
ChargeResponse cannot handle a null response when user cancels transaction , and also have a page with just one Makepayment button is not good for user experience I would like from checkout the user is redirected to the payment page where they enter their payment details without going through the second page for make payment.
now going strait to this page instead of going through the one on top
This is the charge response error for the a cancelled transaction
Can't test any type of payment while test mode is on. using test keys, It's showing transaction expired.
Expected behaviour:
Should be able to test the payment flow.
Actual behaviour:
returns your transaction has been expired.
Reproduces how often:
all time.
The method 'charge' isn't defined for the type 'flutterwave'.
Try correcting the name to the name of an existing method, or defining a method named 'charge
The UI reloads each time i tap on it to put it the card details. This happens with all of the input fields on the package, except the drop-downs.
Expected behaviour:
It should allow for users to input their card details
Actual behaviour:
UI reloads
Reproduces how often:
All the time!
Flutterwave Payment Implementation Code
//Flutterwave payment implementation
Future<void> payUsingFlutterwave(
context,
String currency,
double amount,
String email,
String phone,
String pkey,
String skey,
String enckey,
String name,
String ref) async {
final Customer customer =
Customer(name: name, phoneNumber: phone, email: email);
final Flutterwave flutterwave = Flutterwave(
context: context,
publicKey: pkey,
currency: currency,
txRef: ref,
amount: amount.toString(),
customer: customer,
paymentOptions: "ussd, card, barter, payattitude",
customization: Customization(title: "Pay using Flutterwave"),
isTestMode: true,
redirectUrl: "/");
final ChargeResponse response = await flutterwave.charge();
if (response != null) {
// print("${response.toJson()}");
if (response.success!) {
Future<ResponseModel> verifyFunds(String txnId, String token) async {
late ResponseModel responseModel;
//var dio = Dio();
// print(txnId);
try {
var response = await Dio().get(
'https://api.flutterwave.com/v3/transactions/${txnId}/verify',
options: Options(headers: {
"Content-Type": "application/json",
"Authorization": "Bearer ${token}",
}),
);
if (response.statusCode.toString() == '200' ||
response.statusMessage.toString() == 'OK') {
print('Transaction Verified');
responseModel = ResponseModel(true, 'Funds Verified');
} else {
responseModel = ResponseModel(false, response.statusMessage!);
}
} catch (e) {
print("Error caught " + e.toString());
}
// print(responseModel.isSuccess.toString());
return responseModel;
}
// Call the verify transaction endpoint with the transactionID returned in `response.transactionId` to verify transaction before offering value to customer
if (response.status == 'success' && response.success == true) {
verifyFunds(response.transactionId!, skey).then((status) {
if (status.isSuccess) {
Get.snackbar("Payments", 'Payment Confirmed');
_isPaymentConfirmed = true;
update();
} else {
Get.snackbar(
'Payments', 'Payment Cannot be Confirmed at this Time!');
// print('Transaction Could not be verified!');
}
});
} else {}
} else {
// Transaction not successful
Get.snackbar('Payments', 'Payments Failed!');
}
} else {}
}
Page Calling the Implementation
import 'package:demo/controllers/payments/payment_controller.dart';
import 'package:demo/controllers/users/user_controller.dart';
import 'package:demo/helpers/app_styles.dart';
import 'package:demo/helpers/size_config.dart';
import 'package:demo/models/payments/payment_methods_model.dart';
import 'package:demo/widgets/center_loader_widget.dart';
import 'package:demo/widgets/title_text_widget.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:uuid/uuid.dart';
class PaymentMethodsScreen extends StatelessWidget {
final int? id;
final int? qty;
final double amount;
final double? discount;
final String? title;
final double? charges;
final String? date;
final String? time;
final String? address;
final String? lat;
final String? lng;
PaymentMethodsScreen(
{Key? key,
this.id,
this.qty,
required this.amount,
this.discount,
this.title,
this.charges,
this.date,
this.time,
this.address,
this.lat,
this.lng})
: super(key: key);
@override
Widget build(BuildContext context) {
return GetBuilder<PaymentsController>(builder: (paymentMethodsController) {
return Scaffold(
appBar: AppBar(
title: TitleTextWidget(
titleText: 'Payments',
titleColor: AppStyles.appPrimaryColor,
),
leading: GestureDetector(
onTap: () {
Get.back();
},
child: const Icon(Icons.arrow_back_outlined,
color: AppStyles.appPrimaryColor),
),
backgroundColor: Colors.white,
elevation: 0,
),
backgroundColor: Colors.white,
body: paymentMethodsController.isLoaded
? Container(
padding: EdgeInsets.all(SizeConfig.height10),
height: double.maxFinite,
child: ListView.builder(
itemCount: paymentMethodsController.paymentMethods.length,
itemBuilder: (context, index) {
return Get.previousRoute == '/PremiumPricingModal' &&
index == 0
? Container()
: _buildPaymentListItem(context, index,
paymentMethodsController.paymentMethods[index]);
}),
)
: CenterLoaderWidget(),
);
});
}
Widget _buildPaymentListItem(
BuildContext context, int position, Data paymentMethod) {
var controller = Get.find<PaymentsController>();
var userController = Get.find<UserController>();
return GestureDetector(
onTap: () {
if (paymentMethod.title!.toLowerCase().split(' ').contains('cash')) {
print('Cash');
} else if (paymentMethod.title!
.toLowerCase()
.split(' ')
.contains('flutterwave')) {
//call flutterwave payment method from controller
controller.payUsingFlutterwave(
context,
'NGN',
amount,
userController.userModel.data!.email,
userController.userModel.data?.phone ?? '',
paymentMethod.appPublicKey.toString(),
paymentMethod.appSecretKey.toString(),
paymentMethod.encryptionKey.toString(),
userController.userModel.data!.name,
Uuid().v1()
);
}
},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: SizeConfig.width30, vertical: SizeConfig.height10),
child: Container(
width: SizeConfig.width250,
height: SizeConfig.height70,
padding: EdgeInsets.symmetric(horizontal: SizeConfig.width20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(SizeConfig.radius15),
border: Border.all(width: 2, color: AppStyles.appPrimaryColor)),
child: Center(
child: TitleTextWidget(
titleText: paymentMethod.title!,
titleColor: AppStyles.appPrimaryColor)),
),
),
);
}
}
I've been attempting to integrate the flutterwave payment gateway into my app. I've implemented the desired flow, which goes something like this: I want to add money to my wallet, so first I take input from the user and then redirect to the flutter wave portal, where the user enters their card details, receives an OTP, and the transaction is verified. The above flow works with test keys, but when we replace them with live keys, the server adds another verification and redirects to the return URL specified in the Flutter wave portal and the app. However, it's stuck over there and we are unable to proceed. So, could you please tell us how everything will work out? We've tried webhooks as well, but the problem persists.
We have created a webhook on the server using laravel framework.
Please help to get the flow completed.
The UI always show the message "Transaction Failed" when initiate payment
Expected behaviour:
It should allow for users to input their card details
Expected behaviour:
Actual behaviour:
UI reloads and print Transaction Failed
Reproduces how often:
All the time!
API Version: v3
Environment: Test Mode
Device: android 7.1.1 (android-86 emulator)
Language: Dart
Flutter Version: 3.7.5
with investigation I have capture this response message :
{
"status": "error",
"message": "Transaction Failed",
"data": {
"code": "FLW_ERR",
"message": "Transaction Failed",
"err_tx": {
"id": 4373739,
"flwRef": "484001686064427017",
"chargeResponseCode": "R1",
"chargeResponseMessage": "Transaction Failed",
"status": "failed",
"merchantbearsfee": 1,
"appfee": "75",
"merchantfee": "0",
"charged_amount": "3000.00"
}
}
}
When i initiate a payment, it opens the webview that's supposed to handle the payment but the yellow spinner never stops rolling.
Initiate a payment
Expected behaviour:
It's supposed to show the payment options
Actual behaviour:
Spinner keeps loading
Reproduces how often:
All the time
I suppose this is just a wrapper around the js sdk in a webview. Do we expect a native, pure-dart widgets anytime soon?
If a transaction is cancelled from the card form or any payment method form an exception is thrown with the charge response has no null safety, this happens also if the transaction is closed from the payment page.
The Pay with bank transfer option returns a wrong response for the "success" key. Even when transaction is successful, it returns "false" for the "success" key.
The usual response for card and ussd is (in part):
{
"status": "successful",
"success": true
}
But when you use the pay with bank option, after the transaction is successful, it returns
{
"status": "completed",
"success": false
}
After successfully implementing flutterwave payment, I am getting this error on the simulator and real device you get the below error when opting for all forms of payment options available and using the flutterwave test data.
We could not charge this card. Reason: Cannot destructure property 'daily' of 'checkData(...)' as it is undefined.
Note: All credentials are properly defined and passed
Launching lib/main.dart on SM A125F in debug mode...
: Error: Member not found: 'Overlay.maybeOf'.
var _overlay = Overlay.maybeOf(context!);
^^^^^^^
: Error: The getter 'mounted' isn't defined for the class 'BuildContext'.
FAILURE: Build failed with an exception.
Where:
Script '/home/almohad/Developer/flutter/sdk/packages/flutter_tools/gradle/flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/home/almohad/Developer/flutter/sdk/bin/flutter'' finished with non-zero exit value 1
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.
BUILD FAILED in 22s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Hello, team.
I have gotten white screen issue when I use this module in my app.
Here is log details when I call functions:
D/EGL_emulation( 4852): app_time_stats: avg=150.40ms min=3.14ms max=2736.53ms count=19 I/flutter ( 4852): running timer => true I/flutter ( 4852): 2022-11-12 15:26:45.217339 2022-11-12 15:09:00.329484 false I/flutter ( 4852): URL: http://admin.upaychat.com/api/pendingrequest I/flutter ( 4852): Body: null I/flutter ( 4852): URL: http://admin.upaychat.com/api/wallet I/flutter ( 4852): Body: null D/EGL_emulation( 4852): app_time_stats: avg=18.83ms min=11.80ms max=87.80ms count=53 E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebViewHostApi.create (package:webview_flutter_android/src/android_webview.pigeon.dart:289:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.create (package:webview_flutter_android/src/android_webview.pigeon.dart:1013:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setDomStorageEnabled (package:webview_flutter_android/src/android_webview.pigeon.dart:1061:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setJavaScriptCanOpenWindowsAutomatically (package:webview_flutter_android/src/android_webview.pigeon.dart:1087:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setSupportMultipleWindows (package:webview_flutter_android/src/android_webview.pigeon.dart:1113:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setLoadWithOverviewMode (package:webview_flutter_android/src/android_webview.pigeon.dart:1239:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setUseWideViewPort (package:webview_flutter_android/src/android_webview.pigeon.dart:1263:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setDisplayZoomControls (package:webview_flutter_android/src/android_webview.pigeon.dart:1288:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setBuiltInZoomControls (package:webview_flutter_android/src/android_webview.pigeon.dart:1313:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebViewClientHostApi.create (package:webview_flutter_android/src/android_webview.pigeon.dart:1476:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setUserAgentString (package:webview_flutter_android/src/android_webview.pigeon.dart:1163:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #1 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #2 WebViewAndroidPlatformController.updateSettings (package:webview_flutter_android/webview_android_widget.dart:275:5) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebSettingsHostApi.setMediaPlaybackRequiresUserGesture (package:webview_flutter_android/src/android_webview.pigeon.dart:1189:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 DownloadListenerHostApi.create (package:webview_flutter_android/src/android_webview.pigeon.dart:1749:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #1 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #2 WebView.setDownloadListener (package:webview_flutter_android/src/android_webview.dart:379:5) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebChromeClientHostApi.create (package:webview_flutter_android/src/android_webview.pigeon.dart:1861:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #1 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #2 WebView.setWebChromeClient (package:webview_flutter_android/src/android_webview.dart:399:5) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null) E/flutter ( 4852): #0 WebViewHostApi.loadUrl (package:webview_flutter_android/src/android_webview.pigeon.dart:401:7) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): E/flutter ( 4852): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/webview E/flutter ( 4852): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:219) E/flutter ( 4852): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122) E/flutter ( 4852): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60) E/flutter ( 4852): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262) E/flutter ( 4852): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/flutter ( 4852): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter ( 4852): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter ( 4852): at android.os.Handler.handleCallback(Handler.java:942) E/flutter ( 4852): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter ( 4852): at android.os.Looper.loopOnce(Looper.java:201) E/flutter ( 4852): at android.os.Looper.loop(Looper.java:288) E/flutter ( 4852): at android.app.ActivityThread.main(ActivityThread.java:7898) E/flutter ( 4852): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 4852): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) E/flutter ( 4852): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) E/flutter ( 4852): , null, null) E/flutter ( 4852): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) E/flutter ( 4852): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:296:18) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #2 TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1146:18) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:792:5) E/flutter ( 4852): <asynchronous suspension> E/flutter ( 4852):
Thank you.
Whiles implement the system during developmet, i can seem to access the payment options list in the constructor like card, bater, ussd etc. the app was tested on Tecno Spark 7 pro With android 11. i dont know what i was doing wrong? Can you or you team urgently help to fix this issue
Sorry this is not an issue, i dont know where to post it.
Can you help us add utility payments like electricity, water, tv etc
Thanx
Am developing for the mobile and I want to read and response to the data from ChargeResponse and not showing me a redirect URL. The URLis not what I need. And if I null the parameter it will not display for payment. I want to get the response in ChargeResponse. Please help.
Can you help us add web support to the package so that clients can make payments on a web application
On using the recently updated version of Flutterwave payment package for flutter flutterwave_standard: ^1.0.4
. The above mentioned error message is thrown when you try to proceed to making payments.
Find attached a gif of the event
Find below my code implementation
//Flutterwave payment implementation
Future<void> _payUsingFlutterwave(
BuildContext context,
String currency,
double amount,
String email,
String phone,
String pkey,
String skey,
String enckey,
String name,
String ref) async {
final style = FlutterwaveStyle(
appBarText: "Add Funds using Flutterwave",
appBarTitleTextStyle:
const TextStyle(color: AppStyles.appSecondaryColor),
buttonColor: AppStyles.appPrimaryColor,
appBarIcon: const Icon(Icons.arrow_back_ios_new_outlined,
color: AppStyles.appSecondaryColor),
buttonTextStyle: TextStyle(
color: AppStyles.appSecondaryColor,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.font15,
),
appBarColor: AppStyles.appPrimaryColor,
dialogCancelTextStyle: TextStyle(
color: Colors.redAccent,
fontSize: SizeConfig.font15,
),
dialogContinueTextStyle: TextStyle(
color: Colors.blue,
fontSize: SizeConfig.font15,
));
final Customer customer =
Customer(name: name, phoneNumber: phone, email: email);
final Flutterwave flutterwave = Flutterwave(
context: context,
style: style,
publicKey: pkey,
currency: currency,
txRef: ref,
amount: amount.toString(),
customer: customer,
paymentOptions: "ussd, card, barter, payattitude",
customization: Customization(title: "Pay using Flutterwave"),
isTestMode: true,
redirectUrl: '');
final ChargeResponse response = await flutterwave.charge();
if (response != null) {
// print("${response.toJson()}");
if (response.success!) {
Future<ResponseModel> verifyFunds(String txnId, String token) async {
late ResponseModel responseModel;
//var dio = Dio();
// print(txnId);
try {
var response = await Dio().get(
'https://api.flutterwave.com/v3/transactions/${txnId}/verify',
options: Options(headers: {
"Content-Type": "application/json",
"Authorization": "Bearer ${token}",
}),
);
if (response.statusCode.toString() == '200' ||
response.statusMessage.toString() == 'OK') {
responseModel = ResponseModel(true, 'Funds Verified');
} else {
responseModel = ResponseModel(false, response.statusMessage!);
}
// print(response.statusCode.toString() +
// " & " +
// responseModel.message.toString() +
// " & " +
// response.statusMessage!.toString());
} catch (e) {
// print(e);
}
// print(responseModel.isSuccess.toString());
return responseModel;
}
// Call the verify transaction endpoint with the transactionID returned in `response.transactionId` to verify transaction before offering value to customer
if (response.status == 'success' && response.success == true) {
verifyFunds(response.transactionId!, skey).then((status) {
if (status.isSuccess) {
var walletReportAddFund =
Get.find<WalletTransactionsController>();
var message = 'Funds added by you with transactionId-' +
response.transactionId!.toString();
double addAmount = amount;
AddFundsModel addFundsModel =
AddFundsModel(message: message, amount: addAmount);
// print('Transaction Verified!');
// print(message);
walletReportAddFund.addFunds(addFundsModel).then((addStatus) {
if (addStatus.isSuccess) {
Get.back();
Get.previousRoute == '/addFunds'
? showSuccessSnackBar("Transaction Successful",
title: "Add Funds")
: showSuccessSnackBar("Transaction Successful",
title: "Payment");
} else {
Get.back();
Get.previousRoute == '/addFunds'
? showCustomSnackBar("Transaction Report not stored",
title: 'Add Funds')
: showCustomSnackBar("Transaction Report not stored",
title: 'Payments');
}
});
} else {
// print('Transaction Could not be verified!');
Get.back();
Get.previousRoute == '/addFunds'
? showCustomSnackBar("Transaction Couldn't be verified",
title: 'Add Funds')
: showCustomSnackBar("Transaction Couldn't be verified",
title: 'Payments');
}
});
} else {
Get.back();
Get.previousRoute == '/addFunds'
? showCustomSnackBar("Something went wrong", title: 'Add Funds')
: showCustomSnackBar("Something went wrong", title: 'Payments');
}
} else {
// Transaction not successful
Get.previousRoute == '/addFunds'
? showCustomSnackBar("Transaction Not Successful",
title: "Add Funds")
: showCustomSnackBar("Transaction Not Successful",
title: "Payments");
Get.back();
}
} else {
Get.previousRoute == '/addFunds'
? showCustomSnackBar("User Cancelled Transaction", title: "Add Funds")
: showCustomSnackBar("User Cancelled Transaction", title: "Payments");
Get.back();
}
}
Hi,
I'm using this paymentOption for enable only mobilemoneyghana but in payment screen i saw Barter,card Payment also how can i disable it? is there any way to exclude it?
paymentOptions: "mobilemoneyghana",
I am getting a CORS issue with this.
Access to XMLHttpRequest at 'https://ravesandboxapi.flutterwave.com/v3/sdkcheckout/payments' from origin 'http://localhost:54475' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status
Please help us add Bill Payment(Electricity,Airtime, Data etc)
I am from Uganda
How can i implement Apple Pay as a payment option
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.