Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scout] Add team logo on home page #67

Open
jwt2706 opened this issue Feb 17, 2024 · 0 comments
Open

[scout] Add team logo on home page #67

jwt2706 opened this issue Feb 17, 2024 · 0 comments
Assignees

Comments

@jwt2706
Copy link
Member

jwt2706 commented Feb 17, 2024

On the home page of the app (start.dart in the /lib/ folder), add the logo of the team beside the title "MergeData" on the top bar.

NOTE: To test run the app, you'll have to install the Flutter SDK. I can show you that in person. But you should be able to follow the steps here without that for now.

Steps you'll have to do:

  1. Clone the repo. Go on the dev branch and THEN make a new branch.
  2. Get an image of our team logo and put it in the /assets/images/ folder.
  3. Find the pubspec.yaml file and open it.
  4. Scroll down to like line ~80 or something and here you'll find how we reference other images. This tells the app which images to load. Add the path to your new image in there. Save.
  5. Then, find the start.dart file in the /lib/screens/ folder. The /lib/ folder contains all our source code for the app (like /src/ in the robot code repo).
  6. Then, open start.dart. Locate lines 52, 53, and 54. This is where we will make our change. As you can see, we have the title have some text using the Text() function. We want to add a second function to this, that be, and image function. What we'll use for this is:
Image.asset("here/put/the/path/to/your/image.png", height: the-height-you-want, weight: the-weight-you-want)

Make sure to change the values in the parameters to what you need them to be.
7. There's one thing left to do. We need to tell the app to use BOTH the text AND the image. Here's how we do it:

title: Row(
            children: [
              Image.asset(...),
              Text(...),
            ]
          )

So here, we're telling the app to put both the image and the text in a row. The row is one object, and it has two children (the image and the text). And the Row() function will put them both side by side, like we want.
8. yay

BONUS: add the current year using widget.year.toString() to the title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants