Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theming not working #136

Closed
burhankhanzada opened this issue Apr 13, 2023 · 3 comments · Fixed by #149
Closed

Theming not working #136

burhankhanzada opened this issue Apr 13, 2023 · 3 comments · Fixed by #149

Comments

@burhankhanzada
Copy link

burhankhanzada commented Apr 13, 2023

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 use Builder widget to get its new context so that may it get a theme from that but its also not working.
Secondly setting the InpuputDecoration OutlineInputBorder and BorderSide 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

@aditya-css
Copy link
Collaborator

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.

@aditya-css aditya-css added the more-info-required More information has been requested label Sep 15, 2023
@burhankhanzada
Copy link
Author

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) {},
          ),
        ],
      ),
    );
  }
}

@aditya-css aditya-css removed the more-info-required More information has been requested label Sep 18, 2023
@aditya-css
Copy link
Collaborator

@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.

@manoj-simform manoj-simform linked a pull request Sep 28, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants