adar2378 / pin_code_fields

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs 🤓🤓
https://pub.dev/packages/pin_code_fields
MIT License
690 stars 336 forks source link

Text Color #309

Closed pishguy closed 1 year ago

pishguy commented 1 year ago

how can i change text color of typed characters? its white and i can't change that

PinCodeTextField(
  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  pinTheme: PinTheme(
    borderWidth: 1,
    fieldWidth: 30,
    shape: PinCodeFieldShape.underline,
    activeColor: Colors.black,
    inactiveColor: Colors.black,
    activeFillColor: Colors.transparent,
    selectedColor: Colors.black,
    selectedFillColor: Colors.transparent,
    inactiveFillColor: Colors.transparent,
    fieldOuterPadding: EdgeInsets.zero,
  ),
  appContext: context,
  length: 6,
  obscureText: true,
  obscuringCharacter: '*',
  blinkWhenObscuring: true,
  hintStyle: AppTheme(context).color(Colors.black).make(),
  animationType: AnimationType.fade,
  cursorColor: Colors.black,
  animationDuration: const Duration(milliseconds: 300),
  enableActiveFill: true,
  //errorAnimationController: errorController,
  controller: model.$verifyCode.adaptee,
  keyboardType: TextInputType.number,
  onCompleted: (v) {},
  onChanged: (value) {},
  pastedTextStyle: TextStyle(
    color: Colors.green.shade600,
    fontWeight: FontWeight.bold,
  ),
  beforeTextPaste: (text) {
    return true;
  },
),
PGG-X commented 1 year ago

Maybe you can try this:

PinCodeTextField(
textStyle: TextStyle(color: Colors.black),
)
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.