A solution to an interview challenge from cashir.app

Overview

Cashir Quiz

This is a solution to an interview challenge from cashir.app. In this challenge I am to design a survey application to collect data from users, I am expected to get user responses and persist them locally. I am required to also get and display submitted responses.

About Cashir

Never worry about running out of cash. With Cashir, you can withdraw cash without going to the bank and this is one of many other benefits of being the bank.

Get cash or transfer all for free without joining banking hall queues.

  • Cash withdrawals
  • Cash deposits
  • Cash transfers
  • Access loans
  • Manage transactions
  • Transact securely

Flutter

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

This project is built with flutter.

To check if you have flutter installed, run

flutter doctor 

if you don't have flutter installed and setup, follow this: How to setup Flutter

How to Use

Step 1:

Download or clone this repo by using the link below:

https://github.com/JustineUgo/cashir_quiz.git

Step 2:

Go to project root and execute the following command in console to get the required dependencies:

flutter pub get 

Step 3:

Connect your mobile phone or emulator and run this command:

flutter run

Modules

  • Home
  • History - convers past quizzes answered, with the score
  • Questions - covers the generation of the quizzes

Details

Folder Structure

Here is the core folder structure which flutter provides.

flutter-app/
|- android
|- assets
|- build
|- ios
|- lib
|- test
|- web

Here is the folder structure we have been using in this project

lib/app
|- data/
|- modules/
|- routes.dart

Now, lets dive into the lib folder which has the main code for the application.

1- constants - All the application level constants are defined in this directory with-in their respective files. This directory contains the constants for `theme`, `api endpoints`, `preferences` etc.
2- modules - Contains the 3 different modules of the app. 
3 - routes.dart — This file contains all the routes for your application.

Constants

This directory contains all the application level constants. A separate file is created for each type as shown in example below:

constants/
|- alerts.dart
|- end_points.dart
|- images.dart
|- stylings.dart

Modules

Contains the 3 different modules of the appplication.

modules/
|- history/
|- home/
|- questions

Folders found in each module:

controllers - this is where the logic of the app is written.
views - contains the ui of the module. 
providers — contains the network calls.
models - contains the application's dynamic data structure

Routes

This file contains all the routes for your application.

routes/
|- app_pages.dart
|- app_routes.dart

Main

This is the starting point of the application. All the application level configurations are defined in this file i.e, theme, routes, title, orientation etc.

Conclusion

I will be happy to answer any questions that you may have on this project. 🙂

If you liked my work, don’t forget to star the repo.

You might also like...

The solution allows anchors to compete with each other and co-anchor with viewers in real time

The solution allows anchors to compete with each other and co-anchor with viewers in real time

The solution allows anchors to compete with each other and co-anchor with viewers in real time, with a global end-to-end latency of below 300 ms on average, and supports 1080p resolution.

Dec 29, 2022

This repo is an example of clean architecture using the GetX state-management solution.

This repo is an example of clean architecture using the GetX state-management solution.

GetX Clean Architecture A Flutter Clean Architecture Using GetX. This repo is forked from: https://github.com/phamdinhduc795397/flutter-getx-clean-arc

Jan 3, 2023

⚡FQuery is a powerful async state management solution for flutter. It caches, updates and fully manages asynchronous data in your flutter apps.

⚡ FQuery is a powerful async state management solution for flutter. It caches, updates and fully manages asynchronous data in your flutter apps. It ca

Dec 22, 2022

A simple state management solution that combine the power of inherited widget and rxdart

Inherited RxDart is a state management library that combine the power of InheritedWidget and RxDart, a simple and elegant state management solution for apps of any scale

Oct 26, 2022

FC Times - An all in one solution for farookians

FC Times - An all in one solution for farookians

FC Times An all in one solution for farookians! Don't forget to ⭐ the repo Download Features Departmentwise timetables Exam notifications OD/Attendanc

Oct 5, 2022

An example of "reactive/streaming repository" as a solution for BLoC to BLoC communication

An example of

Reactive Repositories An example of listening to a Stream from repository layer (instead of explicitly using get/fetch) as a solution for BLoC to BLoC

Jan 3, 2023

A flutter state management solution.

A Flutter State Management solution with dependency injection Usage Create your business logic class and place all variables, methods inside it. impor

Dec 15, 2022

A command-line application provide an load optimization solution for flutter web

A command-line application provide an load optimization solution for flutter web

一个命令行工具,针对flutter web加载慢和缓存问题提供了一套解决方案。 功能 通过大文件分片和资源文件cdn化方式,优化flutter web页面加载慢问题。 通过资源文件hash化,解决浏览器强缓存导致功能无法更新问题。 开始 局部安装 dev_dependencies: flutte

Dec 29, 2022

DeerNote is a solution for cross-platform rich editor

#DeerNote is a solution for cross-platform rich editor ###DeerNote contains parts as follows: db: mongodb server: nodejs app: flutter launch mongdb se

Dec 6, 2022
Owner
Ogaraku Justine
Studying Computer Science. Love coding in Python.
Ogaraku Justine
Interview questions and answers for preparation, built in pure flutter also have CI implementation for learning.

toughest An app for interview preparation. Unique animations. More than 100 questions and answer. Good UI. Featured in many websites. For Vietnam user

Md Sadab Wasim 239 Dec 27, 2022
Challenge cannabis - Challenge for Slicing UI Cannabis from FLutter Fan Indonesia

challenge_cannabis Challenge buat Slicing UI Cannabis dari om Kipas Angin FLutte

wind city 3 May 11, 2022
Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to tidily bound separated logic into complex solution.

Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to

Roman Hornak 23 Feb 23, 2022
Kc - A Simple App Solution for Calculation Fraction (Kali) size of a Lehenga. this is very useful for Fashion designers and tailors. Simple UI with best User Experience.

kc A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is yo

Praveen Suthar 0 Jan 8, 2022
Flutter plugin that provides a quick&dirty workaround for incompatibility between VMWare Airwatch MDM solution and Dart Sockets implementation

airwatch_socket_workaround This plugin has been created to enable flutter apps to reach endpoints that are only reachable using a VMWare airwatch per

Gonçalo Silva 5 Nov 11, 2022
Creating cross-platform solution to help keep individuals connected

Back-to-Hue-Frontend Creating cross-platform solution to help keep individuals connected First Draft: No backend Google Maps API, format into desired

Jeevan Prakash 3 Mar 30, 2022
Cubit is a lightweight state management solution

Cubit is a lightweight state management solution. It is a subset of the bloc package that does not rely on events and instead uses methods to emit new states.

Felix Angelov 582 Nov 23, 2022
Lightweight i18n solution for Flutter

fast_i18n Lightweight i18n solution. Use JSON, YAML or CSV files to create typesafe translations. About this library ?? Minimal setup, create JSON fil

Tien Do Nam 186 Dec 26, 2022
Immich - Self-hosted Photo backup solution directly from your mobile phone

IMMICH Self-hosted Photo backup solution directly from your mobile phone. Note T

Alex 6.6k Dec 31, 2022
GetX - one of the most popular state management solution in flutter

GteX Tutorial - Udemy GetX is one of the most popular state management solution in flutter. In addition to state management, GetX provides easy way to

Md. Siam 3 May 18, 2022