I found a solution to use. in web/index.html, I've created a function:
<script type="application/javascript">
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop),
);
function getEmail() {
return params.email;
}
</script>
and in the main.dart file, I imported dart:js package
import 'dart:js' as js;
and I call it that I've created javascript function in web/index.html
String? email;
Future<void> getEmail() async {
setState(() {
email = js.context.callMethod('getEmail');
});
}
I added the codes above in case other people need it. thanks