flutter_paystack icon indicating copy to clipboard operation
flutter_paystack copied to clipboard

Dark Mode paystack SDK doesnt react to change

Open Mtconcept opened this issue 4 years ago • 3 comments

The Paystack package doesn't support the full theme mode, when i switch to dark mode it changes but the dialog box doesn't change its theme, its just white and it remains white but other items changes per the Thememode which make white lie on white in dark mode.

Mtconcept avatar Jun 30 '21 15:06 Mtconcept

I thought #75 Fixed this.

DEVSOG12 avatar Aug 07 '21 13:08 DEVSOG12

I am on the latest build, It is still not working.

keezysilencer avatar Dec 14 '21 13:12 keezysilencer

The best immediate solution is to wrap your widget with theme data and a Builder to get a customer context and then pass it to the checkout Theme( data: ThemeData.light(), child: Builder(builder: (blueThemeContext) { return ElevatedButton( onPressed: () async { Charge charge = Charge() ..amount = (total * 100).toInt() ..reference = DateTime.now().microsecondsSinceEpoch.toString() ..currency = "GHS" ..email = "[email protected]"; CheckoutResponse response = await plugin.checkout(blueThemeContext, method: CheckoutMethod.card, charge: charge, logo: Image(image: AssetImage(Images.logo), width: 50, height: 50)); }, style: Theme.of(context).elevatedButtonTheme.style, child: Text('Confirm Booking')); }), );

keezysilencer avatar Dec 15 '21 08:12 keezysilencer

This should be fixed in 1.0.6. Can you update the package version? Please, feel free to reopen this issue if the bug persists.

wilburx9 avatar Sep 18 '22 20:09 wilburx9