Android用のWebViewを追加。OSのブラウザは起動できないため。

This commit is contained in:
2024-04-30 22:11:33 +09:00
parent 08dd823c41
commit 9d8f1ef31a
5 changed files with 83 additions and 8 deletions

View File

@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class WebViewPage extends StatelessWidget {
final String url;
const WebViewPage({Key? key, required this.url}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('WebView'),
),
body: WebView(
initialUrl: url,
javascriptMode: JavascriptMode.unrestricted,
),
);
}
}