diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..9f62527
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
index e5a15c2..fcbce96 100644
--- a/.idea/libraries/Dart_SDK.xml
+++ b/.idea/libraries/Dart_SDK.xml
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
index 8314cce..831e2b7 100644
--- a/.idea/libraries/Flutter_Plugins.xml
+++ b/.idea/libraries/Flutter_Plugins.xml
@@ -1,12 +1,12 @@
-
-
+
-
+
+
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 5a5d606..30b38eb 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -2,14 +2,7 @@ import 'dart:async';
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
-import 'package:flutter_paytabs_bridge/BaseBillingShippingInfo.dart';
-import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart';
-import 'package:flutter_paytabs_bridge/PaymentSDKQueryConfiguration.dart';
-import 'package:flutter_paytabs_bridge/PaymentSDKSavedCardInfo.dart';
-import 'package:flutter_paytabs_bridge/PaymentSdkApms.dart';
-import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart';
-import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart';
-import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart';
+import 'package:flutter_paytabs_bridge/paytabs_payment.dart';
void main() {
runApp(MyApp());
@@ -29,10 +22,27 @@ class _MyAppState extends State {
}
PaymentSdkConfigurationDetails generateConfig() {
- var billingDetails = BillingDetails("John Smith", "email@domain.com",
- "+97311111111", "st. 12", "eg", "dubai", "dubai", "12345");
- var shippingDetails = ShippingDetails("John Smith", "email@domain.com",
- "+97311111111", "st. 12", "eg", "dubai", "dubai", "12345");
+ var billingDetails = BillingDetails(
+ name: "John Smith",
+ email: "email@domain.com",
+ phone: "+97311111111",
+ addressLine: "st. 12",
+ country: "eg",
+ city: "dubai",
+ state: "dubai",
+ zipCode: "12345",
+ );
+ var shippingDetails = ShippingDetails(
+ name: "John Smith",
+ email: "email@domain.com",
+ phone: "+97311111111",
+ addressLine: "st. 12",
+ country: "eg",
+ city: "dubai",
+ state: "dubai",
+ zipCode: "12345",
+ );
+
List apms = [];
apms.add(PaymentSdkAPms.AMAN);
final configuration = PaymentSdkConfigurationDetails(
diff --git a/example/pubspec.lock b/example/pubspec.lock
index bfba408..3dea411 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -76,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
- version: "2.6.5"
+ version: "2.6.7"
flutter_test:
dependency: "direct dev"
description: flutter
diff --git a/lib/BaseBillingShippingInfo.dart b/lib/BaseBillingShippingInfo.dart
index 6cd6e19..55d863a 100644
--- a/lib/BaseBillingShippingInfo.dart
+++ b/lib/BaseBillingShippingInfo.dart
@@ -3,16 +3,16 @@ import 'flutter_paytabs_bridge.dart';
class BillingDetails {
String name, email, phone, addressLine, country, city, state, zipCode;
- BillingDetails(
- this.name,
- this.email,
- this.phone,
- this.addressLine,
- this.country,
- this.city,
- this.state,
- this.zipCode,
- );
+ BillingDetails({
+ required this.name,
+ required this.email,
+ required this.phone,
+ required this.addressLine,
+ required this.country,
+ required this.city,
+ required this.state,
+ required this.zipCode,
+ });
}
extension BillingDetailsExtension on BillingDetails {
@@ -31,23 +31,18 @@ extension BillingDetailsExtension on BillingDetails {
}
class ShippingDetails {
- String name;
- String email;
- String phone;
- String addressLine;
- String country;
- String city, state, zipCode;
+ String name, email, phone, addressLine, country, city, state, zipCode;
- ShippingDetails(
- this.name,
- this.email,
- this.phone,
- this.addressLine,
- this.country,
- this.city,
- this.state,
- this.zipCode,
- );
+ ShippingDetails({
+ required this.name,
+ required this.email,
+ required this.phone,
+ required this.addressLine,
+ required this.country,
+ required this.city,
+ required this.state,
+ required this.zipCode,
+ });
}
extension ShippingDetailsExtension on ShippingDetails {
diff --git a/lib/flutter_paytabs_bridge.dart b/lib/flutter_paytabs_bridge.dart
index bdd0b06..07f19c2 100644
--- a/lib/flutter_paytabs_bridge.dart
+++ b/lib/flutter_paytabs_bridge.dart
@@ -236,8 +236,8 @@ class FlutterPaytabsBridge {
static Future clearSavedCards() async {
MethodChannel localChannel = MethodChannel('flutter_paytabs_bridge');
- EventChannel localStream =
- const EventChannel('flutter_paytabs_bridge_stream');
+ // EventChannel localStream =
+ // const EventChannel('flutter_paytabs_bridge_stream');
return await localChannel.invokeMethod('clearSavedCards');
}
diff --git a/lib/paytabs_payment.dart b/lib/paytabs_payment.dart
new file mode 100644
index 0000000..52cd064
--- /dev/null
+++ b/lib/paytabs_payment.dart
@@ -0,0 +1,8 @@
+export 'BaseBillingShippingInfo.dart';
+export 'IOSThemeConfiguration.dart';
+export 'PaymentSDKQueryConfiguration.dart';
+export 'PaymentSDKSavedCardInfo.dart';
+export 'PaymentSdkApms.dart';
+export 'PaymentSdkConfigurationDetails.dart';
+export 'PaymentSdkTokeniseType.dart';
+export 'flutter_paytabs_bridge.dart';