-
Notifications
You must be signed in to change notification settings - Fork 0
/
webveiw.dart
73 lines (58 loc) · 2.13 KB
/
webveiw.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(WebviewDemo());
class WebviewDemo extends StatefulWidget {
@override
_WebviewDemoState createState() => _WebviewDemoState();
}
class _WebviewDemoState extends State<WebviewDemo> {
String search ="https%3A%2F%2Fwww.bing.com%2Frs%2F3P%2Fk5%2Fic%2FjDa30LF7gwGTZzTjhxnXrsluokg.jpg";
@override
Widget build(BuildContext context) {
return MaterialApp(
home:
DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
Tab(icon: Icon(Icons.directions_bike)),
],
),
title: Text('Tabs Demo'),
),
body: TabBarView(
children: [
Scaffold(
body: Builder(builder: (BuildContext context){
return WebView(
initialUrl: 'https://www.google.com/searchbyimage?image_url='+search,
javascriptMode: JavascriptMode.unrestricted,
);
}),
),
Scaffold(
body: Builder(builder: (BuildContext context){
return WebView(
initialUrl: 'https://www.bing.com/images/search?view=detailv2&iss=sbi&form=SBIHMP&q=imgurl:'+search+'&idpbck=1&selectedindex=0&id='+search+'&ccid=TpYbjbUv&mediaurl='+search+'&exph=800&expw=533&vt=2&sim=11',
javascriptMode: JavascriptMode.unrestricted,
);
}),
),
Scaffold(
body: Builder(builder: (BuildContext context){
return WebView(
initialUrl: 'https://yandex.com/images/search?source=collections&&url='+search+'&rpt=imageview',
javascriptMode: JavascriptMode.unrestricted,
);
}),
),
],
),
),
),);
}
}