-
-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Card field #27
Card field #27
Conversation
If you like the CardFormField implementation, I would propose to make it the official one and rename it to CardField, and the current CardField call it MethodChannelCardField, which would have its correspondent WebCardField that would not have a method channel |
Maybe we should name the other card field |
stripe_android/android/src/main/kotlin/com/flutter/stripe/StripeSdkCardPlatformView.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's double check the stack and I agree with the remarks of @jonasbark . For the rest 🚢 🇮🇹
baseStyle: widget.style, | ||
child: SizedBox( | ||
height: cardHeight, | ||
child: Stack( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see the use for a stack just to position the card field. I think we can achieve the same with a https://api.flutter.dev/flutter/widgets/SizedOverflowBox-class.html . A stack is normally used to put two or more widgets on top of each other
- Consider removing stack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mm I don't think with SizedOverflowBox you can't remove '10' pixels from the left and right of an undefined width.
The goal is to remove the default padding from the native card, so it can be customized in flutter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also not a big problem just was wondering if we could prevent it :). We can use mediaquery to remove the 10 pixels but to be honest that is maybe more messy.
@remonh87 not sure you got what I was saying. I am proposing to rename CardFormField to CardField, and CardField to MethodChannelCardField, so the structure would end like
|
I approve as well - merge whenever you want 👍 |
- It is not possible to style the cursorColor on Android. There are some workarounds we could evaluate
- Colors is passed between platforms with int values, instead of the react native implementation that uses Strings, this makes it easy to implement on Android and Dart as Colors are int values, iOS is very easy to implement with an extension and it gives the benefit of allowing colors with opacity.