Aug 20, 2020

Creating A Customisable Video Player In Flutter

How to easily create a video player in Flutter using Flick Video Player.

FlutterTechnology

Author

Raghav AhujaRaghav AhujaTech Lead - I
Creating A Customisable Video Player In Flutter

Flick Video Player is a package for Flutter which provides the base architecture to quickly create a custom video player for your app. Flick Player wraps video_player under the hood which gives low level access for video playback.

Check out the code on Github - https://github.com/GeekyAnts/flick-video-player

The video player plugin provided by the Flutter team is great but it does not provide us UI controls to manage the player. It just runs a video and everything else has to be managed manually, from creating a simple play/pause button to some complex UI requirements like a progress bar, animations, playing a list of videos, error fallbacks, loading fallbacks etc.

Flick uses the official video player plugin under the hood and lets you create amazing looking players with all the necessary required features of a video player.

official video player plugin demo image
Official video player plugin.
defaut_player_flick
Player created with Flick.

Features provided by Flick

  • UI widgets to control the player like play/pause, progress bar etc.
  • Auto hide controls.
  • Double tap to seek video.
  • On video tap play/pause, mute/unmute, or perform any action on video.
  • Custom animations.
  • Custom controls for normal and fullscreen.
  • Auto-play list of videos.
  • Many more..

Architecture of Flick Video Player


Flick video player architecture

1. Official video player plugin
The official Flutter video player plugin is used to stream video on native devices.


2. FlickManager
FlickManager initialises and manages FlickVideoManager, FlickControlManager and FlickDisplayManager, which are responsible for interacting with the video_player plugin to perform actions on the player like play/pause, video seek etc. and listen to the current state of the player.

All of the so called sub-managers (FlickVideoManager, FlickControlManager & FlickDisplayManager) implement the ChangeNotifier class and provide change notifications to its listeners. FlickVideoPlayer uses the Provider package to provide all the sub-manager state changes to the widgets.

FlickVideoManager
This manager manages video related operations like initializing the video, video played progress, isBuffering, changing the video etc.

FlickControlManager
This manager manages controls for the video like play/pause, mute/unmute, toggle fullscreen, seek video, replay etc.

FlickDisplayManager 
FlickDisplayManager manages auto hide and show of controls (eg-when user taps on screen), showes forward/backward seek widgets (eg-when user double taps to seek video)


3. Flick widgets
Flick widgets are some commonly used controls and actions which the user will interact with, like play/pause button. These widgets interact with sub-managers to perform operations. Eg - FlickPlayToggle listens to FlickVideoManager to check if video is playing or not and shows the play/pause button accordingly. If the user presses the play/pause button, then FlickControlManager is called upon to perform the action. There are some widgets which are referred to as action widgets which do not provide physical widgets on the screen but are useful to perform actions on videos like FlickShowControlsAction, which shows/hide controls when user taps on the screen, FlickSeekVideoAction which seeks video by 10 seconds (or any user provided value) on double tap of the screen.

Flick provides all the commonly used widgets to enable developers to quickly arrange these widgets using Flutter layout widgets and create their custom looking video player with just a few lines of code. You can also create your own widgets to achieve complex requirements by just interacting with the managers.

Some of the commonly used widgets are:

  • FlickPlayToggle - Play/Pause the video.
  • FlickSoundToggle - Mute/Unmute the video.
  • FlickFullscreenToggle - Toggle fullscreen mode.
  • FlickVideoProgressBar - Progress bar for the video.
  • FlickTotalDuration - Total duration of the video in hh:mm format.
  • FlickCurrentPosition - Current position of the video in hh:mm format.
  • FlickVideoBuffer - Widget shown when video is buffering.
  • FlickAutoHideChild - Widget to auto hide/show its child on FlickShowControlsAction.

    Action Widgets:

  • FlickShowControlsAction - Widget to show/hide controls on tap.
  • FlickSeekVideoAction - Widget to seek video forward/backward on double tap.
  • FlickTogglePlayAction - Widget to play/pause video on tap of the screen.
  • FlickToggleSoundAction - Widget to mute/unmute video on tap of the screen.

How to use?

Add the following dependencies in your pubspec.yaml file of your Flutter project.

    flick_video_player: <latest_version>
    video_player: <latest_version>

Create a FlickManager and pass the manager to FlickVideoPlayer. Make sure to dispose off FlickManager after use.

import 'package:flutter/material.dart';
import 'package:flick_video_player/flick_video_player.dart';
import 'package:video_player/video_player.dart';

class SamplePlayer extends StatefulWidget {
  SamplePlayer({Key key}) : super(key: key);

  @override
  _SamplePlayerState createState() => _SamplePlayerState();
}

class _SamplePlayerState extends State<SamplePlayer> {
  FlickManager flickManager;
  @override
  void initState() {
    super.initState();
    flickManager = FlickManager(
      videoPlayerController:
          VideoPlayerController.network("url"),
    );
  }

  @override
  void dispose() {
    flickManager.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: FlickVideoPlayer(
        flickManager: flickManager
      ),
    );
  }
}

This will provide you with the default player. To create your own controls, pass your custom controls to the FlickVideoPlayer using FlickVideoWithControls widget.

FlickVideoWithControls helps you to render the video and controls widgets passe. It also helps you to manage how the video fits on the screen.

  FlickVideoPlayer(
      flickManager: flickManager,
      flickVideoWithControls: FlickVideoWithControls(
      controls: PlayerControls(),
     ),
);

What you can create?

Flick is highly customisable and lets you play around and create some amazing looking players. Here are few examples created using Flick.

animation_feed_player
landscape_orientation_player

Explore

We have just scratched the surface there is a lot to play around with, so try cloning the repository and get your hands dirty. PR And Issues are welcome on the official Github repository - https://github.com/GeekyAnts/flick-video-player.

Subscribe to Our Newsletter

RELATED ARTICLES

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
Why Legacy Systems Block Real-Time AI Decision-Making
Business

Aug 4, 2026

Why Legacy Systems Block Real-Time AI Decision-Making
Learn how legacy systems limit real-time AI decision-making and what businesses can do to build an AI-ready infrastructure.
What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Business

Aug 4, 2026

What Makes an AI Product Enterprise-Ready? A Business Leader’s Perspective
Most AI pilots never make it to production. Here are the five questions business leaders should ask before approving, buying, or scaling an AI product.
Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Business

Jul 31, 2026

Building AI-Powered Banking CRM Platforms Without Replacing Core Banking Systems
Banks can modernize CRM with AI without replacing their core banking systems. This guide covers the architecture, use cases, governance, and roadmap to do it.
AI in Fintech: Everyone's Talking, Few are Shipping
Business

Jul 30, 2026

AI in Fintech: Everyone's Talking, Few are Shipping
This blog covers the key engineering, governance, and compliance principles required to build production-ready AI systems for financial services.
ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
Business

Jul 27, 2026

ERP and MES Integration for U.S. Pharma Manufacturers: A Roadmap to Achieve Zero-Error Production and End-to-End Traceability
A strategic roadmap for U.S. pharma leaders integrating ERP and MES to reduce production errors, accelerate batch release, strengthen compliance readiness, and enable end-to-end traceability across manufacturing sites.
How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
Business

Jul 24, 2026

How to Build Medical Device Software with AI: Compliance, Architecture, and Development Process
A guide for engineering leaders on building compliant, production-ready AI medical device software, from architecture to FDA clearance.

The Right Conversation Can Save You Six Months.

Whether you’re navigating AI adoption, modernizing legacy systems, or scaling a product - we start by listening. No pitch deck. No template. A real conversation.