Skip to content

Commit

Permalink
Fixed build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wilburx9 committed Oct 21, 2019
1 parent eb3b3a8 commit 0f201d4
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ pubspec.lock
/example/android/app/src/debug/
/example/android/app/src/profile/
/android/.idea/
/example/ios/.symlinks/plugins/rave_flutter/pubspec.yaml
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.0.6-alpha+2
* Fixed build issues

## 0.0.6-alpha+1
* Updated dependencies to latest versions

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export "FLUTTER_APPLICATION_PATH=/Users/wilburx/Dev/Flutter/Projects/rave_flutte
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/wilburx/Dev/Flutter/sdk/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/wilburx/Dev/Flutter/sdk/flutter/bin/cache/artifacts/engine/ios-release"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ PODS:
- Flutter

DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- Flutter (from `.symlinks/flutter/ios-release`)
- rave_flutter (from `.symlinks/plugins/rave_flutter/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)

EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
:path: ".symlinks/flutter/ios-release"
rave_flutter:
:path: ".symlinks/plugins/rave_flutter/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"

SPEC CHECKSUMS:
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
rave_flutter: 5bdc226f3eef53fa1ebdc54f11b08ad6d4d81213
webview_flutter: 1aa7604e6cdb451a9b7ed2c37d5454c0b440246b

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/rave_flutter/rave_flutter.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
);
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class _HomeWidgetState extends State<HomeWidget> {
List<SubAccount> subAccounts = [];
String email;
double amount;
String publicKey = "FLWPUBK_TEST-b3b10c044835cf93d46ac9324c6b5b4a-X";
String encryptionKey = "FLWSECK_TEST04024392f25c";
String publicKey = "PASTE PUBLIC KEY HERE";
String encryptionKey = "PASTE ENCRYPTION KEY HERE";
String txRef;
String narration;
String currency;
Expand Down
3 changes: 3 additions & 0 deletions lib/src/dto/charge_request_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ class ChargeRequestBody extends Equatable {
"client": client,
"alg": alg,
};

@override
List<Object> get props => [pBFPubKey, client, alg];
}
11 changes: 10 additions & 1 deletion lib/src/dto/fee_check_request_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FeeCheckRequestBody extends Equatable {
this.pType,
this.card6,
this.currency,
}) : super([amount, pBFPubKey, pType, card6, currency]);
});

FeeCheckRequestBody.fromPayload(Payload p)
: this.amount = p.amount,
Expand All @@ -37,4 +37,13 @@ class FeeCheckRequestBody extends Equatable {
}
return json;
}

@override
List<Object> get props => [
amount,
pBFPubKey,
pType,
card6,
currency,
];
}
34 changes: 18 additions & 16 deletions lib/src/models/charge_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,7 @@ class ChargeResponseModel extends Equatable {
@required this.chargedAmount,
@required this.redirectUrl,
@required this.hasData,
}) : super([
status,
message,
validateInstructions,
suggestedAuth,
chargeResponseCode,
authModelUsed,
flwRef,
chargeResponseMessage,
authUrl,
appFee,
currency,
chargedAmount,
redirectUrl,
hasData,
]);
});

factory ChargeResponseModel.fromJson(Map<String, dynamic> json) {
Map<String, dynamic> data = json["data"];
Expand All @@ -74,4 +59,21 @@ class ChargeResponseModel extends Equatable {
}

Map<String, dynamic> toJson() => {};
@override
List<Object> get props => [
status,
message,
validateInstructions,
suggestedAuth,
chargeResponseCode,
authModelUsed,
flwRef,
chargeResponseMessage,
authUrl,
appFee,
currency,
chargedAmount,
redirectUrl,
hasData,
];
}
12 changes: 11 additions & 1 deletion lib/src/models/fee_check_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FeeCheckResponseModel extends Equatable {
this.chargeAmount,
this.merchantFee,
this.raveFee,
}) : super([message, status, fee, chargeAmount, merchantFee, raveFee]);
});

factory FeeCheckResponseModel.fromJson(Map<String, dynamic> json) {
Map<String, dynamic> data = json["data"];
Expand All @@ -27,4 +27,14 @@ class FeeCheckResponseModel extends Equatable {
merchantFee: data["merchantfee"],
raveFee: data["ravefee"]);
}

@override
List<Object> get props => [
message,
status,
fee,
chargeAmount,
merchantFee,
raveFee,
];
}
6 changes: 4 additions & 2 deletions lib/src/models/requery_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class ReQueryResponseModel extends Equatable {
this.chargeResponseCode,
this.dataStatus,
this.json,
this.message})
: super([status, chargeResponseCode, dataStatus]);
this.message});

factory ReQueryResponseModel.fromJson(Map<String, dynamic> json) {
var data = json["data"];
Expand All @@ -24,4 +23,7 @@ class ReQueryResponseModel extends Equatable {
message: data["vbvrespmessage"],
json: json);
}

@override
List<Object> get props => [status, chargeResponseCode, dataStatus];
}
6 changes: 4 additions & 2 deletions lib/src/rave_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ class RaveResult extends Equatable {
/// Human readable message
final String message;

RaveResult({@required this.status, this.rawResponse, this.message})
: super([status, rawResponse, message]);
RaveResult({@required this.status, this.rawResponse, this.message});

@override
String toString() {
return 'RaveResult{status: $status, rawResponse: $rawResponse, message: $message}';
}

@override
List<Object> get props => [status, rawResponse, message];
}

enum RaveStatus { success, error, cancelled }
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rave_flutter
description: A new Flutter plugin for making payment with Flutterwave's rave.
version: 0.0.6-alpha+1
version: 0.0.6-alpha+2
author: Wilberforce Uwadiegwu <faradaywilly@gmail.com>
homepage: https://github.com/wilburt/rave_flutter

Expand All @@ -14,7 +14,7 @@ dependencies:
http: ^0.12.0+2
intl: ^0.16.0
meta: ^1.1.7
async: ^2.4.0
async: ^2.3.0
dio: ^3.0.3
get_it: ^3.0.1
equatable: ^0.6.1
Expand Down

0 comments on commit 0f201d4

Please sign in to comment.