I am working with Flutter 3.2.2 for the web and using following code to read the query parameters sent from another website to my website.
import 'package:universal_html/html.dart' as html;
var uri = Uri.dataFromString(html.window.location.href);
Map<String, String> params = uri.queryParameters;
final followers = params["followers"] ?? "0"
I am using universal_html package imported as html. However, sometimes the code works fine to retrieving the query parameters but not 100% as sometimes it doesn’t seems to be able to read the followers and hence returning 0 although in the browser url bar, I can see the followers parameters in there and it not 0. What am I doing wrong and how do I make sure it works reliably everytime?