Git Product home page Git Product logo

rick-and-morty-info's Introduction

Rick and Morty Info

Actions Status Actions Status codecov Flutter version style: effective dart License: MIT

A simple app to demonstrate Clean Architecture with GraphQL and flutter_bloc

Motivation

In Martin Fowler's words,

β€œAny fool can write code that a computer can understand. Good programmers write code that humans can understand.” (Refactoring: Improving the Design of Existing Code, 1999, p. 22)

With this idea in mind, I wanted to demonstrate how we can make a simple app in production grade (and I hope I made my case).

"Production level" implementations

Screenshots

Screen 1 Screen 2 Screen 3

Installation

  • Check if you are in the beta channel of flutter SDK and the version v2.0.1 or higher. Instruction to change flutter channel.
  • Clone the repo
    git clone https://github.com/excogitatr/rick-and-morty-info.git
  • And then we can use the normal build and run procedure
    flutter pub get
    flutter run
  • Some files like *.freezed.dart, *.g.dart, *.iconfig.dart are auto generated. If there is any issue from these files just run this command to regenerate them.
    flutter pub run build_runner watch --delete-conflicting-outputs

Thanks to

  • unclebob (For the infamous Clean Architecture)
  • resocoder (Followed his style in Clean architecture)
  • felangel (For his amazing state management solution)
  • Axel Fuhrmann (For the Rick and Morty GraphQL API)
  • Authors of all the packages I have used, who made our lives easier.

Getting Started

For help getting started with Flutter, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

rick-and-morty-info's People

Contributors

agent515 avatar aumb avatar chetan-goyal avatar elias8 avatar freitzzz avatar vedartm avatar viveky259259 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rick-and-morty-info's Issues

Question about the entity model

In the api documentation, the character schema has a list of the episode schema.

If I want to make a query like this:

query($page: Int!) {
  characters(page: $page) {
    results {
      id,
      name,
      status,
      species,
      image,
      type,
      episode {
        name,
        air_date,
        episode
        
      }
    }
  }
}

Can I insert the List field in the character entity, for example?

project build/run instructions

hi, thanks for this great example/template project. unf. ive had no luck in being able to get it to build/run. would you be able to add instructions for this ?

What about example with mutations?

Is your feature request related to a problem? Please describe.
A read-only example is just a tiny tip of the iceberg. When we start to modify data there are a lot of new problems appear.

unable to run example with latest version of graphql-flutter

I tried to run the app with the new version 1.5 of Flutter and also the latest version of
graphql-flutter: ^1.0.0+4

and ran into issues.

The main issue is the fact the Client is not used in the new graphql-flutter version. and refactor to

static final HttpLink httpLink = HttpLink(
    uri: 'https://rickandmortyapi.com/graphql',
  );

is not working.

Are you able to update the example with Flutter 1.5

BTW: using the graphql-flutter version 0.9.5 in combination with Flutter 1.5 gives all kind of errors in the console

thx, and already thx for the great example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.