ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

Sound Null Safety (Flutter 2) #126

Closed josxha closed 3 years ago

josxha commented 3 years ago

I have migrated the package to sound null safety.

Two package dependencies have not yet been published with zero safety. Therefore, I have temporarily made the following changes:

Already tested it with the sample app, but for a release it should be tested more intensively. if you want to test the null safety version with your own project, you can temporary change can following lines in your pubspec.yaml file:

# stripe_sdk: any
stripe_sdk: 
    git:
      url: git://github.com/josxha/stripe-sdk.git
      ref: master
josxha commented 3 years ago

The AwesomeCard package published its null safety version to pub.dev yesterday. See: https://github.com/iamvivekkaushik/AwesomeCard/pull/21

I made the following changes:

josxha commented 3 years ago

I added the changes from https://github.com/ezet/stripe-sdk/pull/116 to be able to use a custom title for the AddPaymentMethodScreen.

ezet commented 3 years ago

Great! I wanted to do this, but haven't found the time yet. I will test and merge this as soon as I can.

ezet commented 3 years ago

Why are the files in /.idea/ deleted? Any chance you can restore them? It makes it much harder for me to merge the PR

josxha commented 3 years ago

@ezet Sorry for deleting the files in the .idea directory. I just looked up why I did that: The package was not correctly recognized as a dart/flutter project in Intellij. Also manually activating the dart plugin didn't work.

Load settings
Cannot load settings from file '...\stripe-sdk\stripe_sdk.iml': File ...\stripe-sdk\stripe_sdk.iml does not exist
Please correct the file content

The quickest solution for me was to delete the .idea directory and have it recreated. At that time I didn't know that you already asked in the other pull request not to delete the .idea files.

I saw that you removed .iml files from the .gitignore file. That would have been a better solution for me for sure. However, currently the .iml file is not in the repository yet. Could you push it? Or should I create a pull request? Then the problem should hopefully be solved.

ezet commented 3 years ago

@josxha Yes, the problem stems from the fact that someone else added *.iml to gitignore and deleted the iml file in a previous PR. In fact, I am also unable to open the project because of this now. It would be great if you could create a PR with your iml file :)