Giter VIP home page Giter VIP logo

lodgify's Introduction

Lodgify homework

newmovie.mov
  • Tested on Web, iOS and Android
  • The main component is in a sub-package named grouped_tasks: I made it like this because I think this is a component that would be reused on a page possibly multiple times. It exposes three main components:
    • GroupedTasksList which is a model and has fromJson method
    • GroupedTasksNotifier which is a ValueNotifier and has updateTasks and updateTaskCheck methods
    • GroupedTasksWidget which is the whole UI component which takes a GroupedTasksNotifier and a title as arguments
  • the main App defines the lodgifyTheme and creates a material app in which it instantiates a GroupedTasksWidget and a GroupedTasksNotifier.
  • The tasks are fetched on startup from the gist url and parsed, then they are fed to the notifier.
  • for state management I started out using riverpod (a better provider), but found that using flutter_hooks and ValueNotifier is enough.
  • Used only 3 additional packages:
    • flutter_hooks - a great library that brings hooks to flutter like they are in React, it allows for much cleaner code and reusability.
    • freezed - productive model class generator with equality and deep copy helpers. This is actually optional, could have used equatable instead. Helps for immutable changes in ValueNotifier. (also needs build_runner and freezed_annotation)
    • google_fonts for the custom font
  • The expandable rows and the progressbar are custom components using animations
  • Used an efficient calculation algorithm and unit tested it
  • Used https://www.fluttericon.com/ for icons

extras

  • The UI smartly closes a group if it's done and opens the next not completed group. This behaviour can be improved however.

improvement notes

  • Use local fonts and remove google_fonts in production
  • loading state using shimmer
  • UI regression tests
  • Better themeing
  • etc, ...

P.S.

  • Had to copy the api gist provided since it contains inconsistent fields. Not sure if this was intentional or it needs to be updated ๐Ÿ˜„.

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.