Conversation
…iness to pay if the platform is not supported
…essing down to the interface
… (double check on PR)
…ion to replace Android and iOS implementations separately
…in-private into ios_support # Conflicts: # pay/lib/pay.dart # pay_android/ios/Classes/ApplePayButtonView.swift # pay_ios/lib/src/widgets/apple_pay_button.dart # pay_mobile/ios/Classes/SwiftPayPlugin.swift
|
I would suggest to use a linter for this project. It will help a lot I think. There are some patterns that I haven't seen inside the Flutter Framework and I think there could be a better approach. To highlight the most important ones:
GooglePayButton(
paymentConfigurationAsset:10,
paymentItems: 10,
style: 10,
type: 10,
margin: 10,
onPaymentResult: 10,
loadingIndicator:10
)
@override
Future<Map<String, dynamic>> showPaymentSelector(
Map<String, dynamic> profile,
List<PaymentItem> items,
) async {
final result = await channel.invokeMethod('showPaymentSelector', {
'payment_profile': jsonEncode(profile),
'payment_items': items.map((item) => item.toMap()).toList(),
});
return jsonDecode(result);
}There is not good or wrong code about this but I think it improves it by following the style guidelines |
|
Thank you for the review and comments @Arkangel12, @jamesblasco. |
Arkangel12
left a comment
There was a problem hiding this comment.
minor comment. everything else looks good. I will approve it because it can be like it is, the change is after you.
pay/lib/src/widgets/pay_button.dart
Outdated
| class _PayButtonState extends State<PayButton> { | ||
| late final Future<bool> _userCanPayFuture; | ||
|
|
||
| Widget containerizeChildOrShrink({Widget? child, bool isError = false}) { |
There was a problem hiding this comment.
this is kind of a hard this to do, naming stuff, haha, but I will something related to the PayButton class maybe something like showChild.
Co-authored-by: Argel Bejarano <argel.bc18@gmail.com>
|
All comments addressed. |
| import 'dart:convert'; | ||
|
|
||
| import 'package:flutter/services.dart'; | ||
| import 'package:flutter/foundation.dart'; |
There was a problem hiding this comment.
I'm curious what you need from flutter/foundation.dart
There was a problem hiding this comment.
To use the defaultTargetPlatform. See pay_button.dart and pay.dart
There was a problem hiding this comment.
Ahh right. Carry on =)
Closes #6.