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

Fix color transparency #64

Merged
merged 4 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurations": [
{
"name": "example",
"cwd": "stripe/example",
"cwd": "example",
"request": "launch",
"type": "dart",
},
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ SPEC CHECKSUMS:
Stripe: 515db5536fd659b5d79a0898ce1b882b61ab597e
stripe_ios: ce035050135b58a5a838e0d410d53b26f1dc026a

PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.10.1
5 changes: 4 additions & 1 deletion packages/stripe/lib/src/widgets/card_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ class _MethodChannelCardFieldState extends State<_MethodChannelCardField> {
borderColor: Colors.transparent,
borderRadius: 0,
cursorColor: theme.textSelectionTheme.cursorColor ?? theme.primaryColor,
textColor: Colors.red,
textColor: style?.textColor ??
baseTextStyle?.color ??
kCardFieldDefaultTextColor,
fontSize: baseTextStyle?.fontSize ?? kCardFieldDefaultFontSize,
textErrorColor:
theme.inputDecorationTheme.errorStyle?.color ?? theme.errorColor,
Expand Down Expand Up @@ -466,6 +468,7 @@ class _UiKitCardField extends StatelessWidget {

const kCardFieldDefaultHeight = 48.0;
const kCardFieldDefaultFontSize = 17.0;
const kCardFieldDefaultTextColor = Colors.black;

typedef CardChangedCallback = void Function(CardFieldInputDetails? details);
typedef CardFocusCallback = void Function(CardFieldName? focusedField);
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ColorKey {
static String? toJson(Color? color) {
if (color != null) {
// ignore: lines_longer_than_80_chars
return '#${color.value.toRadixString(16).padLeft(6, '0').toUpperCase()}';
return '#${color.value.toRadixString(16).padLeft(8, '0').toUpperCase()}';
}
}

Expand Down