This is a pizza ordering application. You can create pizzas, view them in your cart, update them in your cart, and delete them if you want to start from scratch.
This app is only available on Android. To download the app to your Android device, ensure that you have your device, a Windows PC, and a cable connecting your device to your Windows PC. Plug the cable into your device, and plug the other end of the cable into your PC before beginning.
If you are downloading the app onto a mobile device, the simplest way to do this is to use the app-release.apk
file in the repository.
- Locate the file named
pizza-chef.apk
in the repository above and click on it.
- On the page it brings you to, there is a menu button with three dots near the top right corner. Click on that.
- On the menu that appears underneath it, click on the button that says "Download".
- The file will be downloaded to the location you choose in your system. Make note of where it gets downloaded because you'll need the file path for the next step. I downloaded it to my
Downloads
directory under my user. - Press the Windows key or click on start on your PC
- In the search bar that appears, type in
command
, and click on the app named "Command Prompt" that appears underneath.
- When the command prompt window opens, navigate to the directory in which your downloaded APK resides. For me, I am changing to the
Downloads
directory. - Once in the right directory, run the command
adb install pizza-chef.apk
, where "pizza-chef.apk" should be the name of the file you downloaded. If it is not, type in the name of the APK as it is in your file system.
- If you've done all that correctly, you will see a message stating that the streamed install is in progress, followed by a success message. You are now ready to open and interact with the app on your Android phone.
To access the web version of the Pizza Chef app, open this link.
Note: All instructions for running tests are written with the assumption that the user is using a Windows computer running Windows 11.
To run these tests, we will be using Flutter's built-in test suite, which we will be accessing through the command line.
- To run the automated test script locally, download the GitHub repository to your computer. You can do this by clicking the 'Code' button near the top right of the screen.
- Then, click 'Download Zip' from the menu that appears.
- Next, open your File Explorer and locate your newly downloaded zip folder. Click on it once, then right click on it and select 'Extract All' from the menu that appears.
-
When you're in the right directory, click on the folder once, then right click it. In the menu that appears, click 'Copy as Path'.
-
Next, open your terminal application by pressing and holding the Windows key and then pressing the 'R' key. In the dialog box that appears, ensure that 'cmd' is entered into the text box labeled 'Open', and then click 'OK'.
- Your terminal application will open. Using that path you copied from step 4, enter
cd <copied path>
and then press 'Enter'. Then typeflutter test
and press 'Enter'
- You will see the project download all the necessary dependencies needed for the app, and then you will see the tests run. Once the tests have completed, you will see a message that reads, "All tests passed!"
This app makes use of the Flutter framework, which is a modular tool that helps developers create beautiful and interactive apps for phones, tablets, and computers that work on virtually all platforms. For state management and data persistence, Google Firebase provides a simple interface for writing and reading from a NoSQL database.
The app is capable of creating pizza orders. In the tech world, an app like this one is often referred to as a CRUD application because it revolves around the ability to Create, Read, Update, and Delete information. In the app, users can do all those things with individual pizzas to create their ideal pizza order.
For my environment, I used VS Code because of its abundant extensions and coding helps that accelerate the development process. I built the app using the Flutter framework because it is the one I'm most familiar with, which allowed me to conceptualize and build the app fairly quickly. Firebase was a natural choice after deciding to use Flutter because they were designed to interact with each other, since they are both Google products. That means that integrating and getting started with using Firebase is a quick and simple process.
For the app's navigation, I started out using the traditional method of pushing screens onto the stack and popping them off to return. I quickly realized that that would complicate loading a saved state when the app was closed and re-opened, so I refactored my navigation to always push a replacement screen onto the stack. I also added a navigation drawer on the left side of the application to decentralize the navigation.
I decided to save the following state variables:
- Last used screen
- Values last entered for pizza creation
- Time since last app startup
My reasoning for saving the last used screen was to return the user to that screen if they closed the app and reopened it within a relatively short timeframe.
The last-entered values for the pizza creation ensure that if the app closes or is closed during pizza creation, the user can pick up where they left off if they reopen the app within a relatively short time frame. This state is only loaded when the app is closed and reopens to the order form page because it is assumed that a user will not purposefully navigate away from the order form until they have finished their order.
Knowing the time since the app last started assists in knowing whether to refresh the state. It is not easy in code to tell the difference between when an app is closed or refreshed. The developer has to make certain assumptions and build the app around them. I worked around this problem by always logging the time when the app starts up. If the app starts up and notices that more than 5 minutes have passed since the app was last opened, it is assumed that the user purposefully closed the app the last time, and so the state is refreshed.
Because Flutter offers a built-in framework for testing the application, I used that to minimize costs in time to integrate a different test suite.