-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
When layout cardformfield render second time on screen #1585
Comments
Do you have a reproducible example code for this behavior? |
I just used Cardformfield. first time screen will shown but second time app crashed. |
closed as cannot reproduce |
We are running into this issue as well. This is crashing our Flutter Android apps when run in minifyEnabled false
shrinkResources false To our Stripe Versions:
Sample code Center(
child: stripe.CardField(
controller: _cardEditController,
onCardChanged: (card) async {
if (card?.complete ?? false) {
widget.onCardDetailsCompleted(true);
} else {
widget.onCardDetailsCompleted(false);
}
},
),
), Flutter Doctor
|
It seems like the crash is related to the icon and font used inside of the |
Additional context: Setting
and stripe.CardField(
androidPlatformViewRenderType: stripe.AndroidPlatformViewRenderType.androidView Will prevent the app from crashing, but will leave the input field empty (not icons, or hint text) and I cannot enter payment info. However, if I leave and return to the screen, the card input field does show the card hint, but does not show the credit card icon on the far left side. I can also enter payment info. Setting
Will once again resolve all issues and I can see all of the expected card info fields, and enter payment info. All of the above applies to |
@remonh87 Do you have any initial thoughts? |
@jonasbark Here is my code
Here are logs
Check This video for better understanding |
[ERROR:flutter/fml/platform/android/jni_util.cc(206)] java.lang.IllegalStateException: The Android view returned from PlatformView#getView() was already added to a parent view.
E/flutter (14644): at io.flutter.plugin.platform.PlatformViewsController.initializePlatformViewIfNeeded(PlatformViewsController.java:1094)
E/flutter (14644): at io.flutter.plugin.platform.PlatformViewsController.onDisplayPlatformView(PlatformViewsController.java:1152)
E/flutter (14644): at io.flutter.embedding.engine.FlutterJNI.onDisplayPlatformView(FlutterJNI.java:1461)
E/flutter (14644): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (14644): at android.os.MessageQueue.next(MessageQueue.java:335)
E/flutter (14644): at android.os.Looper.loop(Looper.java:193)
E/flutter (14644): at android.app.ActivityThread.main(ActivityThread.java:8057)
E/flutter (14644): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (14644): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
E/flutter (14644): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
E/flutter (14644):
F/flutter (14644): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1694)] Check failed: fml::jni::CheckException(env).
F/libc (14644): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 14644
The text was updated successfully, but these errors were encountered: