flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
928 stars 514 forks source link

Text becomes invisible when CardFormField is in iOS dark mode #1609

Closed JunichiMuto closed 8 months ago

JunichiMuto commented 8 months ago

Describe the bug When iOS is set to dark mode, the text color of CardFormField becomes white and blends in with the background color, making the text invisible. Simulator Screenshot - iPhone 15 Pro Max - 2024-01-22 at 19 43 56

In the MaterialApp of the main() method,

         theme: ThemeData.light(),
         darkTheme: ThemeData.light(),
         themeMode: ThemeMode.light,

is specified. Also, in CardFormField

         style: CardFormStyle(
                 backgroundColor: Colors.white,
                 borderColor: Colors.black,
                 textColor: Colors.black,
                 placeholderColor: Colors.black),

is specified.

Smartphone / tablet

remonh87 commented 8 months ago

Textcolor is not supported on the cardform on iOS. Also we did hear from Stripe that no additional functionality will be added to these elements. I would suggest the following:

If you insist on using cardform you can change the background color in darkmode:


CardFormStyle(
            backgroundColor: Colors.black,
            borderColor: Colors.blueGrey,
            textColor: Colors.black,
            placeholderColor: Colors.blue,
          ),
``