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
- All the blocs, screens, widgets shared by the application are placed in
common
folder - Inside
modules
folder for each module,Search
andTop Stories
, there are blocs, repositories, screens, models, adapters, widgets etc. TextStyle
,Color
etc are stored instyles
folder.
- 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.
- 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.