Lihat Tutorial Membuat Webview di Flutter - Tutorial Flutter Indonesia

Lihat Tutorial Membuat Webview di Flutter – Tutorial Flutter Indonesia

Dalam bimbingan kali ini kita hendak menekuni metode simpel memakai webview pada flutter. Lihat Tutorial Membuat Webview di Flutter – Tutorial Flutter Indonesia. Buat menunjukkan laman website dalam aplikasi flutter kita menginginkan package WebView.

Catatan Isi

1 Create New Flutter Project

2 Meningkatkan Webview Plugin

3 Source Code

4 Output:

5 Sumber

Create New Flutter Project

# New Flutter project

$ flutter create my_webview_project

# Open this up inside of VS Code

$ cd my_webview_project&& code. Copy

Meningkatkan Webview Plugin

Berikutnya meningkatkan plugin webview_flutter di dalam pubspec. yaml:

dependencies:

flutter:

sdk: flutter

webview_flutter:^0. 3. 24Copy

Source Code

kemudian ganti code lib atau bermain. dart semacam dibawah ini:

import package: flutter atau material. dart;

import package: webview_flutter atau webview_flutter. dart;

void bermain()

runApp( new MaterialApp(

home: MyApp(

title: belajarflutter view,

),

debugShowCheckedModeBanner: false,

));

 

class MyApp extends StatelessWidget

akhir String title;

MyApp( Key key, this. title): luar biasa( key: key);

@override

Widget build( BuildContext context)

return Scaffold(

body: new WebView(

initialUrl:” https: atau atau belajarflutter. com atau”,

javascriptMode: JavascriptMode. unrestricted,

),

);

 

 

Copy

Output:

Lagi Trending :  Download Utorrent Pro