Flutter & Firebase App Tutorial #27 - Finishing Touches

Net Ninja · Beginner ·🛠️ AI Tools & Apps ·6y ago

Key Takeaways

Adds images to a Flutter app and updates the UI to display the images

Full Transcript

or rather than gang so we're about 95% of the way there now but there's just a couple of things I would like to do and they involve images to make this look a bit better so first of all I want to apply a coffee image that surrounds this color to make it look like a coffee cup and then also a background image to the body itself to the home screen itself with some coffee being the spread out to make it look nice and coffee so I've already prepped those images and they're over here in an assets folder you can find these on the github repo for this course the link is down below you have to select the lesson 27 branch and go into the assets folder now then I'm gonna grab these two in a minute and drag them into my project but let me just scoot it on to my other screen it is still the hair but now I can open this up again and I'm gonna create a new folder inside perucrew so let me right click down here and go to a new folder and call this assets so let me now drag those into that folder and now we have to register those inside the post bet ya mol file now I've already done that scroll down to where it says assets and then just add this line underneath assets so now that registers anything inside this folder okay so now we can use those inside this project and we're going to do it in two different places first of all we're going to do on the home screen because that's where we want the Coffee Bean background image and secondly we're going to do it on the brew tile because that's where we output each one of these tiles and this circle avatar right here so we're gonna apply a an image to this as well so let me do this one first of all currently the body of the home screen is just this brew list but what I'd like to do is surround this with a container because we can apply some kind of background decoration to this container then so oops I don't want that up there I want to select brew list and go to the Action menu and then go to rap with container now let's just organize this a bit better so it's on a new line and then inside this container we have the child which is Brewer list but we can now also say decoration and that is going to be a box decoration like so now inside this box decoration widget we can specify now an image property and this image property is going to be a decoration image so decoration image like so and then again inside the decoration image we need to say the image is going to be an asset image sometimes it feels in flutter like your nesting widget within widget within widget and I guess that's not an amazing experience but once you get the hang of how to do these things it isn't really complex at all so anyway the asset image is going to be assets forward-slash coffee underscore BG PNG so that's one of the files we just added inside this assets file this coffee underscore BG file and what we're saying here is that the decoration of this container is a box decoration that takes an image property and that image property is a decoration image where the image itself is an asset image that we grabbed from our files now if you don't understand this I do cover this in more detail in my floater for beginners series feel free to check that out whatever you want the link is always in the description below anyway we've done this but we also need one more property here and that is the fit and this is where we tell it that we want this image to take up the size of the screen so it's going to be box fit cover so it covers the screen okay so if I save this now and hopefully we should see those coffee beans what we do okay step one done now the next step is to add on the image to these circle avatars right here so let's do that and this is pretty simple all we need to do is add a background image property to this circle avatar so let me do that I'm going to say background image oops image and this is going to be an asset image again like so and this time it's going to be assets forward slash coffee underscore icon dot PNG I think that was the name let me double check this coffee icon PNG awesome so then if I save it now hopefully we should see the coffee icon right here not great I know I'm not going to win any disaster Awards I just wanted to make it look a little bit like a coffee cup from a bird's eye perspective so the coffee's in the middle with this a sheen on it a plate underneath and you can see the handle hopefully that makes sense to you but the reason we can still see the color underneath this by the way is because the middle of this image is transparent okay it's just kind of like the coffee cup and the plate underneath that has color in it the rest is transparent so the color right here is still shining through and that's why we can see it and if I change it if I go to settings and make it for example a black coffee that should still update over here yes it does we can see it's a black coffee okay so let me try making this light to make sure it still works update this and yep it's light it looks like a cup of milk awesome so there we go my friends that is our app completely done so in the next video I just want to take a few minutes to kind of stat again delete all the users and try this out from scratch just test it out with a few different users at about three or four and see if there's any problems but hopefully there won't be

Original Description

Hey gang, in this Flutter tutorial we'll put some final touches to our app! ---------------------------------------- 🐱‍💻 🐱‍💻 Course Links: Course files - https://github.com/iamshaunjp/flutter-firebase 🐱‍💻 🐱‍💻 Other Related Courses: + Flutter Tutorial for Beginners - https://www.youtube.com/playlist?list=PL4cUxeGkcC9jLYyp2Aoh6hcWuxFDX6PBJ + Firebase Auth Tutorial - https://www.youtube.com/playlist?list=PL4cUxeGkcC9jUPIes_B8vRjn1_GaplOPQ + Firebase Firestore Tutorial - https://www.youtube.com/playlist?list=PL4cUxeGkcC9itfjle0ji1xOZ2cjRGY_WB
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Net Ninja · Net Ninja · 0 of 60

← Previous Next →
1 Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
2 Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
3 Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
4 GraphQL Tutorial #1 - Introduction to GraphQL
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
5 GraphQL Tutorial #2 - A Birdseye View of GraphQL
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
6 GraphQL Tutorial #3 - Project (stack) Overview
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
7 GraphQL Tutorial #4 - Making Queries (front-end preview)
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
8 GraphQL Tutorial #5 - Express App Setup
GraphQL Tutorial #5 - Express App Setup
Net Ninja
9 GraphQL Tutorial #6 - Setting up GraphQL
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
10 GraphQL Tutorial #7 - GraphQL Schema
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
11 GraphQL Tutorial #8 - Root Query
GraphQL Tutorial #8 - Root Query
Net Ninja
12 GraphQL Tutorial #9 - The Resolve Function
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
13 GraphQL Tutorial #10 - Testing Queries in Graphiql
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
14 GraphQL Tutorial #11 - GraphQL ID Type
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
15 GraphQL Tutorial #12 - Author Type
GraphQL Tutorial #12 - Author Type
Net Ninja
16 GraphQL Tutorial #13 - Type Relations
GraphQL Tutorial #13 - Type Relations
Net Ninja
17 GraphQL Tutorial #14 - GraphQL Lists
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
18 GraphQL Tutorial #15 - More on Root Queries
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
19 GraphQL Tutorial #16 - Connecting to mLab
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
20 GraphQL Tutorial #17 - Mongoose Models
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
21 GraphQL Tutorial #18 - Mutations
GraphQL Tutorial #18 - Mutations
Net Ninja
22 GraphQL Tutorial #19 - More on Mutations
GraphQL Tutorial #19 - More on Mutations
Net Ninja
23 GraphQL Tutorial #20 - Updating the Resolve Functions
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
24 GraphQL Tutorial #21 - GraphQL NonNull
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
25 GraphQL Tutorial #22 - Adding a Front-end
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
26 GraphQL Tutorial #23 - Create React App
GraphQL Tutorial #23 - Create React App
Net Ninja
27 GraphQL Tutorial #24 - Book List Component
GraphQL Tutorial #24 - Book List Component
Net Ninja
28 GraphQL Tutorial #25 - Apollo Client Setup
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
29 GraphQL Tutorial #26 - Making Queries from React
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
30 GraphQL Tutorial #27 - Rendering Data in a Component
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
31 GraphQL Tutorial #28 - Add Book Component
GraphQL Tutorial #28 - Add Book Component
Net Ninja
32 GraphQL Tutorial #29 - External Query File
GraphQL Tutorial #29 - External Query File
Net Ninja
33 GraphQL Tutorial #30 - Updating Component State
GraphQL Tutorial #30 - Updating Component State
Net Ninja
34 GraphQL Tutorial #31 - Composing Queries
GraphQL Tutorial #31 - Composing Queries
Net Ninja
35 GraphQL Tutorial #32 - query variables
GraphQL Tutorial #32 - query variables
Net Ninja
36 GraphQL Tutorial #33 - Re-fetching Queries
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
37 GraphQL Tutorial #34 - Book Details Component
GraphQL Tutorial #34 - Book Details Component
Net Ninja
38 GraphQL Tutorial #36 - Styling the App
GraphQL Tutorial #36 - Styling the App
Net Ninja
39 GraphQL Tutorial #35 - Making a Single Query
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
40 Build Apps with Vue & Firebase - Udemy Course
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
41 Updated Vue & Firebase Course (Udemy)
Updated Vue & Firebase Course (Udemy)
Net Ninja
42 Vue & Firebase Real-time Chat (Preview) #1 - Intro
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
43 Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
44 Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
45 Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
46 Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
47 Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
48 Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
49 Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
50 Object Oriented JavaScript Tutorial #1 - Introduction
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
51 Object Oriented JavaScript Tutorial #2 - Object Literals
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
52 Object Oriented JavaScript Tutorial #3 - Updating Properties
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
53 Object Oriented JavaScript Tutorial #4 - Classes
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
54 Object Oriented JavaScript Tutorial #5  - Class Constructors
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
55 Object Oriented JavaScript Tutorial #6 - Class Methods
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
56 Object Oriented JavaScript Tutorial #7 - Method Chaining
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
57 Object Oriented JavaScript Tutorial #8 - Class Inheritance
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
58 Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
59 Object Oriented JavaScript Tutorial #10 - Prototype
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
60 Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja

Related Reads

Up next
The Official Shopify Sidekick Tutorial (Part 2)
Learn With Shopify
Watch →