Closed burhankhanzada closed 1 year ago
Hey @burhankhanzada,
Thank you for opening the issue.
Could you kindly provide some insights into how you are using the CreditCardWidget
/CreditCardForm
(i.e. what parameters you have passed) and what parameters of the Theme
you would like to be applied to CreditCardWidget
/CreditCardForm
? This would enable us to better understand and debug the mentioned issue or to assist you in using the widget properly.
The thing is theme not working in CreditCardForm as i gave the example below and set red color theme and swatch then theme on variable on the widget it self but non of theme worsk and still textfield borders are material default blue color hsowing
import 'package:flutter/material.dart';
import 'package:flutter_credit_card/flutter_credit_card.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primaryColor: Colors.red,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.red,
),
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
CreditCardForm(
cvvCode: '123',
expiryDate: '12/34',
cardHolderName: 'Name',
themeColor: Colors.red,
cardNumber: '123456789',
formKey: GlobalKey<FormState>(),
onCreditCardModelChange: (CreditCardModel data) {},
),
],
),
);
}
}
@burhankhanzada Thank you for providing further information. I have created a PR request solving this specific issue you can find it here. Please feel free checkout that branch and see if you still face the issue.
Describe the bug The first inherited theme from the material app not working. i also try to set the theme explicitly with the
Theme
widget and useBuilder
widget to get its new context so that may it get a theme from that but its also not working. Secondly setting theInpuputDecoration
OutlineInputBorder
andBorderSide
color didn't work either. Lastly I also try to change these themes in the repo example app but have no effect either always using Flutter blue