Introduction (What It does)
This is a simple Flutter app built by following the clean architecture pattern. This app fetches the data from the numbersapi.com website.
There are two endpoints where this app fetches data from:
- numbersapi.com/number
- numbersapi.com/random
Working is very simple, the user will just type the number on the search field and press the button on the main screen, which will fetch the trivia for that particular number user typed. And when they press the button named RANDOM, that will fetch any random trivia and show it on the text widget of the main screen.
The real power of this app is the Clean Architecture Pattern and the Test-Driven Development.
How I built it
I build the app with the help of the Flutter framework and dart language, and I followed the clean architecture pattern which divides the app into three different layers (Presentation, Domain, and Data). Also, I used the Test-Driven approach while building this app, in that I created the unit tests of each case before even writing the implementation of the actual methods.
For managing the state I used the BloC state management and the use dependency injection in order to initialize the objects.
Challenges I ran into
- At the start understanding the unit testing was somehow complicated to me, but still, I tried and achieve this.
- Understanding the clean architecture was complicated at the start but after reading articles and two times watching the same video, things were easy for me.
Accomplishments that I'm proud of
- Understand the clean architecture
- Understand the unit testing
- Implement it from scratch.
Built With
- clear-architecture-pattern
- dart
- dependency-injection
- flutter
- test-driven-development

Log in or sign up for Devpost to join the conversation.