SimformSolutionsPvtLtd / flutter_credit_card

A credit card widget for Flutter application.
https://pub.dev/packages/flutter_credit_card
MIT License
431 stars 262 forks source link

Fix theme inheritance #115

Closed cedvdb closed 2 years ago

cedvdb commented 2 years ago

This is a breaking change PR.

The main goal of this PR was to remove the Theme used in the form widget which was not supposed to be there. If you want to have a portion of your app, or a widget such as this one have specific styles you should be able to wrap it with a Theme and pass it whatever theme you'd like. That's what a MaterialApp does, it wraps your whole app.

This package however decided to wrap the form with its own theme and copying only a variant of the primary color, this made it impossible to cascade styles and locked you into the author choice, which is not ideal, since many color from the material color scheme were wrong.

Additional fixes.

cedvdb commented 2 years ago

Please thick the "squash commits" box if this happens to be merged