Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 2.25 KB

README.md

File metadata and controls

40 lines (28 loc) · 2.25 KB

Hacker News

Hacker News is a very basic application with the following functionality

  • Shows top 25 stories
  • User can search stories
  • View the story in a webview along with the related comments and replies

Screenshots

Structure

  • All the blocs, screens, widgets shared by the application are placed in common folder
  • Inside modules folder for each module, Search and Top Stories, there are blocs, repositories, screens, models, adapters, widgets etc.
  • TextStyle, Color etc are stored in styles folder.

Basic API call flow

  • First we try to collect the story ids in a List
  • Then we fetch the details of the stories and wait for them to retrieve all the data
  • Since this is resource-heavy work, we put this in a separate isolate so that this work doesn't block our UI thread.
  • After fetching all the needed data, we change the data according to our need and feed it to the UI.

Running the code

  • run flutter pub get to get the needed package
  • run flutter run to run the application

P.S: Diagrams and screenshots can be found inside root/diagrams and root/screenshots folders repsectively.