Giter VIP home page Giter VIP logo

potentiam_gallery's Introduction

potentiam_gallery

Mobile - Flutter Challenge

Getting Started

  1. Architecture: I've used Clear Architecture with BLoc pattern. Earlier, I thought of using MVVM pattern using rxdart but as per the problem statement, stick to BLoc only.

We can use View model (Reactive) Pattern approach rather than Bloc Pattern for complex use-case Cons of Using Bloc:

  • Boilerplate code
  • Too many Event and States for complex view
  • One to one mapping of event and state
  • Communication between multiple blocs add up more confusion. (Maintainability issue)

Note: I have just added the view model support as well in the project, in order to use it, use viewmodel provier and stream builder in the view.

  1. Data Layer and Remote Communication: I've used Dio library and Retrofit for the network communication. Used Curl Interceptor in Dio just for the logging and testing the network calls.

  2. Dependency Injection: All the layers of Clean Arch. supports dependency injection. I've created modules which provides view model / blocs after injecting the right dependencies to the class.

  3. How to Build:

  • To Build the APK, use the command flutter build apk lib/main.dart

  • To Test it in the web, run the command flutter run -d chrome --web-renderer html

  • To generate a production build for web, run the command flutter build web --web-renderer html --release

  1. How to Test: a. Install the apk on the Android Device or open the web app. Make sure the device has the internet. b. It will load the list of albums. Tap on the album to see its photos. c. On List Albums view, in the Text Input view, enter the proper album name and hit Search button to search the Album.

  2. Widget Testing: Test file name - potentiam_gallery/test/widget_test.dart

I've created 4 test cases to test AlbumRow, AlbumPhotoRow, AlbumFilter Widgets

How to test:

  • Go to the project root
  • Run the command: flutter test test/widget_test.dart
  1. Improvements:
  • We can improve the filter functionalities by the local search on the fetched albums list
  • We can support features like - type ahead and show suggestions while typing
  • We can use MVVM pattern for the complex projects for better management of the states.
  1. Screen recordings: https://drive.google.com/file/d/1F7bEEis_eSjHNC94wZ2uTVIyndTpCClV/view?usp=sharing

potentiam_gallery's People

Contributors

sumit-bounce avatar

Watchers

James Cloos avatar Sumit Saurabh avatar

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.