github
9.26.0, released 4 months ago by spinlock.sh
A high-level GitHub API Client Library for Dart and Flutter.
WASM-ready
What it does
It provides a client library for interacting with GitHub's v3 API across server, browser, and Flutter applications. It supports authentication, built-in OAuth2 flow, and a hook server helper.
AI-written summary of version 9.26.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to interact with the GitHub API from a Dart or Flutter application.
- You want built-in support for GitHub authentication and OAuth2 flows.
Skip it when
- You are looking for an official GitHub-maintained project.
- You require complex caching or advanced offline storage layers out of the box.
Strengths
- Works across server, browser, and Flutter
- Includes builtin OAuth2 flow and hook server helper
- Active community contributions and updates
Weaknesses
- Not an official GitHub project (maintained by volunteers)
- Limited to GitHub's API v3 scope primarily
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 4
Add the dependency to pubspec.yaml and configure authentication tokens or OAuth2 credentials as needed.
import 'package:github/github.dart';
var github = GitHub(auth: Authentication.withToken('YOUR_TOKEN'));
var repositories = await github.repositories.listUserRepositories('username').toList();Alternatives
Packages that do the same job and could replace github.
Works with
Packages commonly used together with github: ones it builds on, ones built on it, and its own family.
- json_annotationgithub depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- http_parsergithub depends on itA platform-independent package for parsing and serializing HTTP formats.
- flutterpi_toolBuilt on githubA tool to make development and distribution of flutter-pi apps easier.
- static_shockBuilt on githubA static site generator for Dart.
- pub_releaseBuilt on githubAutomates publishing Dart packages to pub.dev, handling version bump, git tags, changelog, and optional dry-run.