Flutter Starter

Flutter Starter

  • Docs
  • Roadmap
  • Github
  • Hire The Creators

›Sample apps

Introduction

  • Getting started
  • Motivation
  • Installation
  • Editor setup
  • Folder structure

Styleguide

  • Add image assets
  • Add fonts assets
  • Add splash screen
  • Add color constants
  • Add theme data

Build the app

  • Add routers
  • Add dependencies

API SDK

  • API SDK overview
  • API SDK REST
  • API SDK GraphQL

State management

  • Shared overview
  • Add models
  • Add resources
  • Add BLoC

Sample apps

  • HackerNews App
  • GithubRepo List App
  • Weather App
  • Bookstore App

Test

  • Add test files

Deployment

  • Deployment

Firebase Setup Guide

  • For Android
  • For iOS

GithubRepo List App

To learn more about this example, visit the Github Repo List App page.

The API URL is in api-constants.dart. Go to your github account and create a personal access token.

//For the graphql.
import 'package:graphql/client.dart';

OptimisticCache cache = OptimisticCache(
  dataIdFromObject: typenameDataIdFromObject,
);
GraphQLClient client() {
  final HttpLink _httpLink = HttpLink(
    uri: 'https://api.github.com/graphql',
  );

  final AuthLink _authLink = AuthLink(
    getToken: () => 'Bearer <YOUR GITHUB API TOKEN>',
  );

  final Link _link = _authLink.concat(_httpLink);

  return GraphQLClient(
    cache: cache,
    link: _link,
  );
}

//For the Rest
Map<String, String> apiConstants = {"auth": "https://reqres.in/api"};

To sign up, use these credentials:

Email "eve.holt@reqres.in",
Password "pistol"

Your app should look like this:

← HackerNews AppWeather App →
Docs
Getting StartedExamples
Community
TwitterDiscord
More
GitHubContribution Guidelines
Stars
Built with ❤️  at GeekyAnts.
Copyright © 2021 Flutter Starter