I'm having problems on overriding the default color for placeholder in CupertinoTextField. As I'm trying to set it white it always turns to gray. I've inspected the flutter source base and found this:
|
if (widget.placeholder != null && text.text.isEmpty) { |
|
stackChildren.add( |
|
Padding( |
|
padding: widget.padding, |
|
child: Text( |
|
widget.placeholder, |
|
maxLines: 1, |
|
overflow: TextOverflow.ellipsis, |
|
style: widget.style.merge( |
|
const TextStyle( |
|
color: _kInactiveTextColor, |
|
fontWeight: FontWeight.w300, |
|
), |
|
), |
|
), |
|
), |
|
); |
|
} |
Is there any other way around this?
Here is my flutter installation details:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.10.2, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[✓] Android Studio (version 3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
[✓] Connected device (1 available)
• No issues found!
I'm having problems on overriding the default color for
placeholderin CupertinoTextField. As I'm trying to set it white it always turns to gray. I've inspected the flutter source base and found this:flutter/packages/flutter/lib/src/cupertino/text_field.dart
Lines 541 to 558 in dfd0229
Is there any other way around this?
Here is my flutter installation details: