Android用のWebViewを追加。OSのブラウザは起動できないため。
This commit is contained in:
21
lib/pages/WebView/WebView_page.dart
Normal file
21
lib/pages/WebView/WebView_page.dart
Normal 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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user