|
|
@@ -5,12 +5,12 @@ import 'package:webview_flutter/webview_flutter.dart'; |
|
|
|
import 'package:zhiying_comm/zhiying_comm.dart'; |
|
|
|
|
|
|
|
// 淘宝详情图加载 |
|
|
|
class TaobaoImageLoader extends StatefulWidget { |
|
|
|
class TaobaoImageWebviewLoader extends StatefulWidget { |
|
|
|
final String url; |
|
|
|
String script; |
|
|
|
final ValueChanged<List<String>> onImagesLoad; |
|
|
|
|
|
|
|
TaobaoImageLoader(this.url, {Key key, this.script, this.onImagesLoad}) |
|
|
|
TaobaoImageWebviewLoader(this.url, {Key key, this.script, this.onImagesLoad}) |
|
|
|
: super(key: key) { |
|
|
|
this.script = script; |
|
|
|
if (EmptyUtil.isEmpty(this.script)) { |
|
|
@@ -20,10 +20,11 @@ class TaobaoImageLoader extends StatefulWidget { |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
_TaobaoImageLoaderState createState() => _TaobaoImageLoaderState(); |
|
|
|
_TaobaoImageWebviewLoaderState createState() => |
|
|
|
_TaobaoImageWebviewLoaderState(); |
|
|
|
} |
|
|
|
|
|
|
|
class _TaobaoImageLoaderState extends State<TaobaoImageLoader> { |
|
|
|
class _TaobaoImageWebviewLoaderState extends State<TaobaoImageWebviewLoader> { |
|
|
|
WebViewController _webViewController; |
|
|
|
|
|
|
|
List<String> _images = []; |