Skip to content

Commit

Permalink
update README.md :: callback function
Browse files Browse the repository at this point in the history
  • Loading branch information
Shegun Montcho committed Mar 18, 2024
1 parent b1d5c59 commit 97de1cd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,20 @@ void successCallback(response, context) {
switch ( response['status'] ) {
case PAYMENT_CANCELLED:
debugPrint(PAYMENT_CANCELLED);
Navigator.pop(context);
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text(PAYMENT_CANCELLED),
));
debugPrint(PAYMENT_CANCELLED);
break;
case PENDING_PAYMENT:
debugPrint(PENDING_PAYMENT);
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text(PENDING_PAYMENT),
));
break;
case PAYMENT_INIT:
debugPrint(PAYMENT_INIT);
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text(PAYMENT_INIT),
));
break;
break;
case PENDING_PAYMENT:
debugPrint(PENDING_PAYMENT);
break;
case PAYMENT_SUCCESS:
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(
Expand All @@ -101,12 +93,11 @@ void successCallback(response, context) {
),
),
);
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text(PAYMENT_SUCCESS),
));
break;
case PAYMENT_FAILED: print(PAYMENT_FAILED);
case PAYMENT_FAILED:
Navigator.pop(context);
print(PAYMENT_FAILED);
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-03-15 18:51:05.161949","version":"3.19.3"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-03-17 00:44:03.071882","version":"3.19.3"}
7 changes: 4 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ packages:
kkiapay_flutter_sdk:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
name: kkiapay_flutter_sdk
sha256: "9825f40c084364e6720455e8b96974fde21487e5122dc4b9a6b8e311ce78ab9f"
url: "https://pub.dev"
source: hosted
version: "1.2.12"
leak_tracker:
dependency: transitive
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
kkiapay_flutter_sdk:
path: ../
kkiapay_flutter_sdk: ^1.2.10
#path: ../

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 97de1cd

Please sign in to comment.