Flutter game RollMyDice with Firebase

Rahul Kandoriya
2 min readDec 11, 2020

Recently I wrote an app which was the part of the technical interview at one of the startup.

The Game Rules!

The application is a game, where the player can press a button to “Roll a dice”, and get a Random result anywhere between 1 and 6, the Player gets 10 chances to play, and every time the result of the dice roll should get added to the Player’s score. After 10 attempts the player’s results should be logged into the leaderboard. It has to be a Multi-User Application (with Registration and Login Pages)

View the project and GitHub code in here.

Roadmap

The main thing I had to consider while building it was to finish the app in 24 hours!

Tech Stack and Architecture

Flutter and firebase with the help of the stream-based architecture using flutter_riverpod package https://pub.dev/packages/flutter_riverpod

The architecture reference https://codewithandrea.com/videos/2020-02-10-starter-architecture-flutter-firebase/

UI & UX

User experience was simple. There are three main screens after the user has authenticated and for authentication, I used to sign in with phone number so verifying the number will be the first and common step while sign in or sign up. After verifying the phone number if the user is new then he/she have to enter his/her name otherwise the home screen appears.

There are three main screens namely RollDice(Play area), LeaderBoard and Account.

After registration, the user can edit his/her details anytime by going into the account screen.

Summary

It was a great learning experience for me even if I don’t go through the interview. Technical steps are available on Github and do check out the project.

--

--

Rahul Kandoriya

Solving the problems of humans by technologies. I try to find solutions to the problems I observe in my daily life. Check out my projects 👇