title: How can I detect the progress(initialize/end) of video player in Flutter?
body: <p>I am very new to Flutter and don't know much about it.</p>
  
  <p>I am using video_player and chewie package in Flutter.
  I want to send analytics data when video starts and ends.</p>
  
  <p>So, I want to know both timing.
  how can I detect the video start / end timing?</p>
  
  <p>My code is following.</p>
  
  <pre><code>import 'package:chewie/chewie.dart';
  import 'package:flutter/material.dart';
  import 'package:video_player/video_player.dart';
  
  class VideoItem extends StatefulWidget {
    final VideoPlayerController videoPlayerController;
    final bool looping;
  
    VideoItem({
      @required this.videoPlayerController,
      this.looping,
      Key key,
    }) : super(key: key);
  
    @override
    _VideoState createState() =&gt; _VideoState();
  
  }
  
  class _VideoState extends State&lt;VideoItem&gt; {
    ChewieController _chewieController;
  
    @override
    void initState() {
      super.initState();
  
      _chewieController = ChewieController(
        videoPlayerController: widget.videoPlayerController,
        aspectRatio: 1 / 1,
        autoPlay: true,
        autoInitialize: true,
        looping: widget.looping,
        allowFullScreen: false,
        allowMuting: true,
        errorBuilder: (context, errorMessage) {
          return Center(
            child: Text(
              errorMessage,
              style: TextStyle(color: Colors.white),
            ),
          );
        },
      );
    }
  
  ...
  
    @override
    Widget build(BuildContext context) {
      return Padding(
        padding: const EdgeInsets.all(0.0),
        child: Chewie(
          controller: _chewieController,
        ),
      );
    }
  }
  </code></pre>