Add a specific folder in plugins from github repository

Viewed 200

I want to add a specific plugin from the plugins repo.

For example, I only want to add video_player for my project. Something like this:

dependencies:
  cupertino_icons: ^1.0.2
  flutter:
    sdk: flutter
  video_player: 
    git:
      url: https://github.com/flutter/plugins/tree/main/packages/video_player
      ref: main

Is there any way I can do this? Thank you!

I forked from the repository and changed something for temp bug fixes and want to pull the fixes from the forked repo.

1 Answers

Following the Flutter document, we can specify the path of the subfolder from a root of a repository, like this:

video_player: 
    git:
      url: git@github.com:flutter/plugins.git
      ref: main
      path: packages/video_player/video_player
Related