Skip to content
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

Merged
merged 11 commits into from
Apr 29, 2021
Merged

Card field #27

merged 11 commits into from
Apr 29, 2021

Conversation

jamesblasco
Copy link
Member

  • Fixes focus problem on Android
  • Temporal fix for the keyboard problem on android
  • Allow custom theme
    - 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.
  • Allow custom placeholders

@jamesblasco jamesblasco requested review from jonasbark and remonh87 and removed request for jonasbark April 25, 2021 08:03
@jamesblasco
Copy link
Member Author

jamesblasco commented Apr 25, 2021

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
@jonasbark @remonh87

@remonh87
Copy link
Member

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
@jonasbark @remonh87

Maybe we should name the other card field WebcardField instead of MethodChannelCardfield ? For the rest I agree :)

Copy link
Member

@remonh87 remonh87 left a 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 🚢 🇮🇹

stripe/lib/src/widgets/card_form_field.dart Show resolved Hide resolved
baseStyle: widget.style,
child: SizedBox(
height: cardHeight,
child: Stack(
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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.

@jamesblasco
Copy link
Member Author

jamesblasco commented Apr 26, 2021

Maybe we should name the other card field WebcardField instead of MethodChannelCardfield ? For the rest I agree :)

@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

  • CardField
    • MethodChannelCardField
      • AndroidCardField
      • UIKitCardField
    • WebCardField
      (Web does not use method channels, so implementation is quite different)

@jonasbark
Copy link
Member

I approve as well - merge whenever you want 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants