秉承着看得懂就看看不懂就问的原则,直接上代码
import 'package:chewie/chewie.dart';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:midou_ee/mall/mall_router.dart';
import 'package:midou_ee/routers/navigator_util.dart';
import 'package:video_player/video_player.dart';
class GoodVideoWidget extends StatefulWidget {
final String video;
GoodVideoWidget({Key key, this.video}) : super(key: key);
@override
_GoodVideoWidgetState createState() => _GoodVideoWidgetState();
}
class _GoodVideoWidgetState extends State<GoodVideoWidget> {
Widget playerWidget;
VideoPlayerController _controller;
// bool _isPlaying = false;
String url = '';
@override
void initState() {
super.initState();
_controller = VideoPlaye