Open osama300 opened 1 month ago
I have same issue. i don't get an error from the method or plugin, what I get is the childOnError widget which is from the package. ALso, I want to know if it possible to integrate for Countries like Nigeria. I successfully see the button on ios simulator, but not on ios real device. Below is a code that doesn't display for android.
FutureBuilder
paymentConfiguration: snapshot.data!,
paymentItems: _paymentItems,
type: GooglePayButtonType.buy,
margin: const EdgeInsets.only(top: 15.0),
onPaymentResult: (result) {
print("result:: ${result}");
},
width: phoneWidth,
childOnError: const Text("Google Pay not supported"),
loadingIndicator: const Center(
child: CircularProgressIndicator(),
),
)
: snapshot.hasError
? textWidget(context,
title: "Erro: ${snapshot.error.toString()}")
: textWidget(context, title: "unknown error");
}),
Make sure you have a card in your google wallet! This has happened to me and when i added a card in the google wallet the button appeared. The same issues can be fixed with the same way in the ios platform.
i use string json config here print error but not print any thing
onError: (e){ print('this error $e'); },