I am newbie in flutter, i am using its Webview and have website with Razorpay integrated, but when I click on Razorpay and on netbanking the website isn't taking me to payment page, instead it just keeps loading
I get this in terminal
Initializing SystemTextClassifier, type = System
Wallet - Amazonpay method seems to redirect to amazon page, but phonepe doesn't I tried with launch URL as well, doesnt' work
class TestApp extends StatelessWidget {
const TestApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
const _testHomeUrl = "https://www.test.in";
const _proxyUserAgent =
"Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19";
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Test',
home: Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(0),
child: AppBar(
title: const SizedBox(
height: kToolbarHeight,
),
)),
body: WebView(
initialUrl: _testHomeUrl,
javascriptMode: JavascriptMode.unrestricted,
userAgent: _proxyUserAgent,
navigationDelegate: (NavigationRequest request) {
if (request.url.startsWith("https://www.test.in/")) {
return NavigationDecision.navigate;
} else {
_launchURL(request.url);
return NavigationDecision.prevent;
}
},
),
));
}
}
_launchURL(String url) async {
await launch(url);
}
