Skip to content

Commit

Permalink
upgraded iOS version
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-Magdy-PT committed May 19, 2024
1 parent 24ee61c commit 0e63c11
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 35 deletions.
42 changes: 21 additions & 21 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .idea/libraries/Flutter_Plugins.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,8 @@

## 2.6.9

* Dark Theme colors in iOS
* Dark Theme colors in iOS

## 2.6.10

* Background Colors for input fields
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Flutter PayTabs Bridge
![Version](https://img.shields.io/badge/flutter%20paytabs%20bridge-v2.6.9-green)
![Version](https://img.shields.io/badge/flutter%20paytabs%20bridge-v2.6.10-green)

Flutter paytabs plugin is a wrapper for the native PayTabs Android and iOS SDKs, It helps you integrate with PayTabs payment gateway.

Expand All @@ -12,7 +12,7 @@ Plugin Support:

```
dependencies:
flutter_paytabs_bridge: ^2.6.9
flutter_paytabs_bridge: ^2.6.10
```

## Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ private PaymentSdkConfigurationDetails getPaymentSdkConfigurationDetails(JSONObj
private Map<String, Object> getMetadata() {
Map<String, Object> metadata = new HashMap<>();
metadata.put("PaymentSDKPluginName", "flutter");
metadata.put("PaymentSDKPluginVersion", "2.6.9");
metadata.put("PaymentSDKPluginVersion", "2.6.10");
return metadata;
}

Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ PODS:
- Flutter (1.0.0)
- flutter_paytabs_bridge (2.4.0):
- Flutter
- PayTabsSDK (= 6.6.12)
- PayTabsSDK (= 6.6.13)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PayTabsSDK (6.6.12)
- PayTabsSDK (6.6.13)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -27,9 +27,9 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_paytabs_bridge: 8f95b832c17d25029f13ff41f4d78eced9533de7
flutter_paytabs_bridge: ab85d1181ffd0f493936e9ed5cdb34a92020cc78
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
PayTabsSDK: e21452eccc65457a7ca1d71632f437a5d2f51da2
PayTabsSDK: 5cf90f25f0b1bea35adf60760ecad1d23c17ec40

PODFILE CHECKSUM: 30e530dca029506e89ebfe0cc8965d34306c559c

Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class _MyAppState extends State<MyApp> {
linkBillingNameWithCardHolderName: true);
final theme = IOSThemeConfigurations();
theme.logoImage = "assets/logo.png";
theme.backgroundColor = "e0556e";
theme.backgroundColorDark = "520f3a";
// theme.backgroundColor = "e0556e";
// theme.backgroundColorDark = "520f3a";


configuration.iOSThemeConfigurations = theme;
Expand Down
4 changes: 4 additions & 0 deletions ios/Classes/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ let pt_ios_stroke_thinckness = "pt_ios_stroke_thinckness"
let pt_ios_inputs_corner_radius = "pt_ios_inputs_corner_radius"
let pt_ios_button_font = "pt_ios_button_font"
let pt_ios_title_font = "pt_ios_title_font"
let pt_ios_input_background_color = "pt_ios_input_background_color"
let pt_ios_input_background_color_dark = "pt_ios_input_background_color_dark"


let pt_ios_logo = "pt_ios_logo"
let pt_transaction_type = "pt_transaction_type"
let pt_apms = "pt_apms"
Expand Down
5 changes: 4 additions & 1 deletion ios/Classes/SwiftFlutterPaytabsBridgePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public class SwiftFlutterPaymentSDKBridgePlugin: NSObject, FlutterPlugin {
configuration.cardDiscounts = generateDiscountDetails(dictionary: discountsDictionary)
}

configuration.metaData = ["PaymentSDKPluginName": "flutter", "PaymentSDKPluginVersion": "2.6.9"]
configuration.metaData = ["PaymentSDKPluginName": "flutter", "PaymentSDKPluginVersion": "2.6.10"]
return configuration
}

Expand Down Expand Up @@ -371,6 +371,9 @@ public class SwiftFlutterPaymentSDKBridgePlugin: NSObject, FlutterPlugin {
if let colorHex = dictionary[pt_ios_placeholder_color + "\(isDark ? "_dark" : "")"] as? String {
theme.placeholderColor = UIColor(hex: colorHex)
}
if let inputColorHex = dictionary[pt_ios_input_background_color + "\(isDark ? "_dark" : "")"] as? String {
theme.inputFieldBackgroundColor = UIColor(hex: inputColorHex)
}
return theme
}
private func eventSink(code: Int, message: String, status: String, transactionDetails: [String: Any]? = nil, trace: String? = nil) {
Expand Down
2 changes: 1 addition & 1 deletion ios/flutter_paytabs_bridge.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A new flutter plugin project.
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '11.0'
s.dependency "PayTabsSDK", "6.6.12"
s.dependency "PayTabsSDK", "6.6.13"
s.static_framework = true
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
Expand Down
7 changes: 7 additions & 0 deletions lib/IOSThemeConfiguration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class IOSThemeConfigurations {
int? inputsCornerRadius;
String? buttonFont;
String? titleFont;
String? inputFieldBackgroundColor;
String? inputFieldBackgroundColorDark;


IOSThemeConfigurations({
this.logoImage,
Expand Down Expand Up @@ -57,6 +60,8 @@ class IOSThemeConfigurations {
this.inputsCornerRadius,
this.buttonFont,
this.titleFont,
this.inputFieldBackgroundColor,
this.inputFieldBackgroundColorDark,
});
}

Expand Down Expand Up @@ -100,6 +105,8 @@ extension IOSThemeConfigurationsExtension on IOSThemeConfigurations {
pt_ios_inputs_corner_radius: this.inputsCornerRadius,
pt_ios_button_font: this.buttonFont,
pt_ios_title_font: this.titleFont,
pt_ios_input_background_color: this.inputFieldBackgroundColor,
pt_ios_input_background_color_dark: this.inputFieldBackgroundColorDark
};
}
}
3 changes: 3 additions & 0 deletions lib/flutter_paytabs_bridge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ const String pt_discount_cards = "pt_discount_cards";
const String pt_discount_value = "pt_discount_value";
const String pt_discount_title = "pt_discount_title";
const String pt_is_percentage = "pt_is_percentage";
const String pt_ios_input_background_color = "pt_ios_input_background_color";
const String pt_ios_input_background_color_dark = "pt_ios_input_background_color_dark";


class FlutterPaytabsBridge {
static Future<dynamic> startCardPayment(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_paytabs_bridge
description: Flutter plugin for Paytabs, used to handle payments using Card, Apms ... etc.
version: 2.6.9
version: 2.6.10
homepage: "https://github.com/paytabscom/flutter-sdk-bridge"
environment:
sdk: ">=2.12.0 <4.0.0"
Expand Down

0 comments on commit 0e63c11

Please sign in to comment.