perbaikan on possale string 1
This commit is contained in:
@@ -25,11 +25,15 @@ const String failureUrl = 'order-status?status=failed';
|
||||
class PaymentScreenState extends State<PaymentScreen> {
|
||||
late WebViewController controller;
|
||||
final ImagePicker _imagePicker = ImagePicker();
|
||||
late bool isSupportedPlatform;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
isSupportedPlatform = Platform.isAndroid || Platform.isIOS;
|
||||
|
||||
if (!isSupportedPlatform) return;
|
||||
|
||||
paymentUrl = paymentUrl.replaceAll(APIConfig.domain, APIConfig.domain).replaceAll('plan_id', widget.planId).replaceAll('business_id', widget.businessId);
|
||||
|
||||
controller = WebViewController()
|
||||
@@ -72,6 +76,24 @@ class PaymentScreenState extends State<PaymentScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!isSupportedPlatform) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(lang.S.of(context).paymentGateway),
|
||||
),
|
||||
body: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Text(
|
||||
'Payment Gateway is not supported on this device. Please use an Android or iOS device to complete the subscription.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
|
||||
Reference in New Issue
Block a user