Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a Flutter example #219

Open
GroovinChip opened this issue Apr 13, 2020 · 8 comments
Open

Provide a Flutter example #219

GroovinChip opened this issue Apr 13, 2020 · 8 comments

Comments

@GroovinChip
Copy link

Currently, the example directory is not a Flutter app. It would be good for a Flutter app to be there to
A) show a Flutter example for using this library as the README only shows a pure Dart example
B) improve pub.dev scoring

@github-actions
Copy link

Thanks for submitting an issue! @robrbecker will take a look soon!

@robrbecker
Copy link
Member

I totally agree!

@GroovinChip
Copy link
Author

Any update on this?

@GroovinChip
Copy link
Author

Hello. I'm curious if you guys are still planning to address this issue.

@robrbecker
Copy link
Member

@GroovinChip We'd still love a Flutter example if you're up for adding one :)

@theRealBitcoinClub
Copy link

theRealBitcoinClub commented Dec 26, 2021

Hey @robrbecker , I would also be very interested in a Flutter example!

I am currently trieng to understand the integration tests as they seem to be the best reference to understand the library.

Or what would be the best way to learn how to use the library from some working examples that do include the full information?

e.g. the integration tests use some environment variables that are not visible so its hard to guess what has to be provided to get things started, currently my requests are failing and it might be my mobile internet connection here in Venezuela, haha but who knows, gotta check again tomorrow

I tried the following code:

var github = GitHub(auth: Authentication.withToken(ConfigReader.getGithubKey()));

var gitBlob = CreateGitBlob(merchant.getBmapDataJson(), "utf-8");

var blob = await github.git.createBlob(
  RepositorySlug.full("https://github.com/theRealBitcoinClub/flutter_coinector.git/test.json"),gitBlob);

I want to achieve two very simple use cases:

  1. I want to upload an image to a repository that I have as base64
  2. I want to add one line to an existing .json document

Optional use cases would be:

  1. Create a branch
  2. Create a PR

I can offer to write the Flutter examples with documentation once I have understood how I could achieve the steps 1. 2. then create a PR and with some more advice I might also be able to integrate 3. 4.

I have not seen any other Github Flutter library so it seems to me that it would make a lot of sense to invest a little bit of time into that challenge, I personally love GitHub as I use it for database and image hosting for many open source apps of which flutter_coinector is the most wanted one.

What do you think? If there is any chance we should get this done ASAP, otherwise I will keep trying tomorrow or have to look into different solutions as my tasks are time critical. Enjoy the holidays!

@theRealBitcoinClub
Copy link

@GroovinChip Did you integrate the library into your project? Could you provide me with any code sample or give any advice related to my comment above?

@theRealBitcoinClub
Copy link

Hmm, checking the API I found a class called GitHubFile, https://pub.dev/documentation/github/latest/github/GitHubFile-class.html

And I found github.repositories.createFile which receives a fileName as an argument

So I guess my RepositorySlug would be "https://github.com/theRealBitcoinClub/flutter_coinector.git"

Am I getting closer to solve my issue number 1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants