diff --git a/README.md b/README.md index a5da680..e076a8f 100644 --- a/README.md +++ b/README.md @@ -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( @@ -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: diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 667355f..9a56864 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 0f166ef..388fb9e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -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 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 34859f9..4e65677 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -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: