I’m attempting to use Flutter Webview to display a form from Airtable, but I’ve encountered an issue. Initially, with version 3.0.0 of Flutter Webview, the form loaded correctly, but I could not add image files as attachments. After upgrading to version 4.2.0, the problem persists; I still can’t attach any files. Here’s some relevant code for context:
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class CustomerRegistration extends StatefulWidget {
const CustomerRegistration({Key? key}) : super(key: key);
@override
State<CustomerRegistration> createState() => _CustomerRegistrationState();
}
class _CustomerRegistrationState extends State<CustomerRegistration> {
int loadProgress = 0;
WebViewController controller = WebViewController();
@override
void initState() {
super.initState();
controller
..setNavigationDelegate(
NavigationDelegate(
onPageStarted: (url) {
setState(() {
loadProgress = 0;
});
},
onProgress: (progress) {
setState(() {
loadProgress = progress;
});
},
onPageFinished: (url) {
setState(() {
loadProgress = 100;
});
},
),
)
..loadRequest(
Uri.parse('https://airtable.com/shrNceygh14VGsLR2'),
)
..setJavaScriptMode(JavaScriptMode.unrestricted);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Airtable Form',
selectionColor: Color.fromARGB(255, 13, 42, 167),
),
),
body: WebViewWidget(
controller: controller,
),
);
}
}