Assignment 3 - Stateful Widgets

  1. Due
  2. Objectives
  3. Collaboration
  4. Setup
    1. Accept the assignment on GitHub
    2. Check out the code in VSCode
  5. Instructions
    1. Screen One - Rows and Columns
    2. Screen Two - More Rows and Columns
    3. Screen Three - Buttons and States
    4. Screen Four - Image Swapper
    5. Extra Credit - Image Swapper Deluxe
  6. Submission

Due

Tuesday, February 20 @ 11:59pm via GitHub

Objectives

Collaboration

This assignment may be completed in pairs. Both partners receive the same grade. You are assigned to the same teams as Assignment 2. Contact me if you wish to change your team.

Setup

Accept the assignment on GitHub

  1. Follow this link to GitHub: https://classroom.github.com/a/QnkEGhQR.
  2. The next screen talks about teams:
    • if you are working alone: create a new team using your last name. If you get an error, add a “2” to your team name.
    • if you are working in a pair:
      1. The first person to sign up should create a team named “<your lastname>-<partner’s lastname>”, e.g., “smith-jones”. If get a GitHub error, add a “2” to your team name.
      2. The second person to sign up should click “Join” on the appropriate team from the list.
  3. Click “Accept the assignment” on the next page.
  4. The next page will say “You accepted the assignment…” Click on the link to your team’s assignment repository – bookmark this page. If you are the first person to accept the assignment on your team, you will have to refresh the page a few times before the link appears as GitHub takes a second to create the repository.

Check out the code in VSCode

  1. In VSCode, go to File Menu -> New Window. You should see an “empty” copy of VSCode pop open.
  2. Click the Explorer icon on the left. Explorer icon
  3. Click the Clone Repository button. Paste in the URL of the GitHub repository. Hit Enter. You may need to enter your GitHub email and password.
  4. A file browser will pop up and ask you where to clone the repositroy on your local machine. Select the folder where you are keeping your Flutter projects.
  5. VSCode will clone the code from GitHub to your machine. A pop-up will appear asking if you would like to open the cloned repository – click ‘Open’.
  6. Click on the Explorer Pane icon to see the Flutter project files. Open lib/main.dart.
  7. A pop-up should prompt you to “Run pub get”. Do this. If no pop-up, open the Command Palette (View -> Command Pallette), and search for and run “pub get”.
  8. You are now ready to work on the project. You must follow the GitHub workflow when working on this assignment. It is extremely important if you work on a team or if you use multiple computers.

Instructions

You have a skeleton of a Flutter app already provided for you.

There is a PlaceHolder widget in each of ScreenOne-ScreenFour. Delete this widget and replace it with the widget(s) that are required to achieve the UIs described below.


Screen One - Rows and Columns

Screen one layout demo


Screen Two - More Rows and Columns

Screen two layout demo


Screen Three - Buttons and States


Screen Four - Image Swapper

You will define a custom widget that swaps between two pictures when the user clicks on the image. The two images in the screen sample below are in the assets/images folder. You may use them or add your own.


Extra Credit - Image Swapper Deluxe

Submission

Commit and push (synchronize) your completed code to GitHub.