git_clone library
A library for cloning a git repository.
There are two base functions the library provides:
gitClone()
: Clone a repository via repo link.fastClone()
: Clone a repository through different Platforms.
In most cases, all you need is fastClone, which makes it easy to clone a repository from different platforms like GitHub, GitLab. But if you want to clone a repository from a private git server, you should use gitClone.
Also, the library provides a function to download a repository archive, gitCloneArchive. If you don't have a git client installed, you can use this function to download a repository archive. View https://github.com/g1eny0ung/git_clone/issues/2 for more information.
Extensions
Functions
-
fastClone(
{required Platform platform, required String ownerAndRepo, Protocol protocol = Protocol.https, String? directory, Map< String, dynamic> ? options, Callback? callback}) → Future<void> -
Clone a git repository from Platform and
ownerAndRepo
by calling gitClone. -
gitClone(
{required String repo, String? directory, Map< String, dynamic> ? options, Callback? callback}) → Future<void> -
Clone a git repository by
repo
and targetdirectory
. -
gitCloneArchive(
{required String url, required String destination}) → Future< void> -
Download a git repository archive from
url
and save it todestination
.
Typedefs
-
Callback
= Future<
void> Function(ProcessResult)