BottomSheet

5 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€86.40
List Price:  €120.96
You save:  €34.56
£73.64
List Price:  £103.10
You save:  £29.45
CA$136.47
List Price:  CA$191.06
You save:  CA$54.59
A$153.85
List Price:  A$215.40
You save:  A$61.54
S$127.97
List Price:  S$179.16
You save:  S$51.19
HK$784.85
List Price:  HK$1,098.82
You save:  HK$313.97
CHF 81.36
List Price:  CHF 113.91
You save:  CHF 32.54
NOK kr1,000.28
List Price:  NOK kr1,400.43
You save:  NOK kr400.15
DKK kr644.53
List Price:  DKK kr902.37
You save:  DKK kr257.83
NZ$165.70
List Price:  NZ$231.98
You save:  NZ$66.28
د.إ367.21
List Price:  د.إ514.10
You save:  د.إ146.89
৳12,223.08
List Price:  ৳17,112.80
You save:  ৳4,889.72
₹8,557.84
List Price:  ₹11,981.32
You save:  ₹3,423.48
RM422.35
List Price:  RM591.31
You save:  RM168.96
₦153,576.64
List Price:  ₦215,013.44
You save:  ₦61,436.80
₨28,232.17
List Price:  ₨39,526.17
You save:  ₨11,294
฿3,246.17
List Price:  ฿4,544.77
You save:  ฿1,298.60
₺3,932.24
List Price:  ₺5,505.30
You save:  ₺1,573.05
B$553.71
List Price:  B$775.22
You save:  B$221.50
R1,786.78
List Price:  R2,501.56
You save:  R714.78
Лв169.63
List Price:  Лв237.49
You save:  Лв67.85
₩135,527.35
List Price:  ₩189,743.72
You save:  ₩54,216.36
₪355.96
List Price:  ₪498.35
You save:  ₪142.39
₱5,569.26
List Price:  ₱7,797.19
You save:  ₱2,227.92
¥14,368.42
List Price:  ¥20,116.37
You save:  ¥5,747.94
MX$1,895.56
List Price:  MX$2,653.86
You save:  MX$758.30
QR364.03
List Price:  QR509.66
You save:  QR145.63
P1,339.03
List Price:  P1,874.70
You save:  P535.66
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£4,970.22
List Price:  E£6,958.52
You save:  E£1,988.29
ብር13,549.05
List Price:  ብር18,969.21
You save:  ብር5,420.16
Kz91,186.38
List Price:  Kz127,664.58
You save:  Kz36,478.20
CLP$93,408.65
List Price:  CLP$130,775.85
You save:  CLP$37,367.20
CN¥717.62
List Price:  CN¥1,004.70
You save:  CN¥287.08
RD$5,924.40
List Price:  RD$8,294.40
You save:  RD$2,370
DA13,073.15
List Price:  DA18,302.93
You save:  DA5,229.78
FJ$224.49
List Price:  FJ$314.30
You save:  FJ$89.80
Q768.64
List Price:  Q1,076.13
You save:  Q307.48
GY$20,984.89
List Price:  GY$29,379.69
You save:  GY$8,394.79
ISK kr12,407.75
List Price:  ISK kr17,371.35
You save:  ISK kr4,963.60
DH908.88
List Price:  DH1,272.46
You save:  DH363.58
L1,712.89
List Price:  L2,398.12
You save:  L685.22
ден5,343.07
List Price:  ден7,480.52
You save:  ден2,137.44
MOP$808.60
List Price:  MOP$1,132.08
You save:  MOP$323.47
N$1,767.05
List Price:  N$2,473.95
You save:  N$706.89
C$3,679.13
List Price:  C$5,150.93
You save:  C$1,471.80
रु13,692.70
List Price:  रु19,170.33
You save:  रु5,477.62
S/360.34
List Price:  S/504.49
You save:  S/144.15
K408.38
List Price:  K571.75
You save:  K163.37
SAR375.07
List Price:  SAR525.11
You save:  SAR150.04
ZK2,459.74
List Price:  ZK3,443.74
You save:  ZK983.99
L434.63
List Price:  L608.50
You save:  L173.87
Kč2,140.04
List Price:  Kč2,996.15
You save:  Kč856.10
Ft34,670.60
List Price:  Ft48,540.23
You save:  Ft13,869.62
SEK kr946.48
List Price:  SEK kr1,325.11
You save:  SEK kr378.63
ARS$118,183.59
List Price:  ARS$165,461.75
You save:  ARS$47,278.16
Bs691.16
List Price:  Bs967.65
You save:  Bs276.49
COP$415,846.82
List Price:  COP$582,202.18
You save:  COP$166,355.36
₡50,814.58
List Price:  ₡71,142.44
You save:  ₡20,327.86
L2,609.73
List Price:  L3,653.73
You save:  L1,044
₲798,123.27
List Price:  ₲1,117,404.50
You save:  ₲319,281.23
$U4,132.41
List Price:  $U5,785.54
You save:  $U1,653.12
zł368.76
List Price:  zł516.28
You save:  zł147.52
Already have an account? Log In

Transcript

Hello, in this video, I am going to show you how to implement a bottom sheet. So the bottom sheet basically allows you to open up like a little menu that just scrolls up from the bottom, it's a really cool thing to do. So you might get seen applications when you click a button, maybe you have like a blue bar at the bottom, it has an arrow, you click it, and you just saw, you know, scrolls up. And you could have different options. That option potentially could be made for sharing for deleting something for editing, not that sort of stuff. Obviously, the functionality the option that you want to provide a totally up to you.

I'm going to show you how to implement a bottom sheet and you can customize it however you wish. And to implement the bottom sheet. Really simple to be fair. So what we need to do is in our classes start a local void. And this is basically going to be the method that initiates the bottom sheet. Don't open bottom sheet is in a context which we'll be using Very soon.

And now we do show modal bottom sheet. And I would like I didn't manually myself. So I, you know, keep track of what I've been doing. And the context is going to be what's being passed through. We're going to have build up if we were we're going to be constructing what our, you know, bottom sheet will look like. And this will be content on at first.

And now what we are going to do put the code in braces and in here we need to exclude a container. And inside of here, we need a new child. This is going to be wrap. And in here, you would have tools so this is the general no format for in in here. You connected Weber children, you want to put tactical images, but I recommend trying to do that as well. But you'll see that without extra formatting, it just doesn't look very good.

What you want is in this, Oh, this looks fine stick inside of a bottom sheet. And the list tile will go into how a kneading is basically going to be an icon at start. And again, you can customize the arrangement of what you put in here with the icons da, see a lot. Again, we're not doing functionalities, just the you know, the visual front end side, and the title for this loan, and then comma, and then he bought on top. So once we click it, we can, you know, do some functionality. I'm just going to do a print up the simpleness A For example, and that's it.

And if you want to add more options, you literally just need to duplicate that and modify this this. And what's in the on top of this is to have some coal on this one. And instead of a long icon, a map icon. Yeah, go on with a map. Yeah. Let's save that.

Let's see what we got nothing yet because we haven't actually triggered it. So what we're going to do is go down here is create this is going to be icon button. So this needs a icon, icons, dots and I'm going to say is that something for open Yeah, let's do this again, this way looks like and it's an event for encore. So when it's been pressed, we're going to trigger that, but we can trigger it by saying open bottom sheet, you need the context. And this is created right here. But we'll save that.

We'll see that with the hot reload button appears. I click it. As you can see, it appears from the bottom now looks pretty cool. I'll click alarm, we get open alarm, we get perfect that you might be thinking, how do we close this and go back to the main part of our application, click off it. If you don't want that, you want to be able to essentially click one of the items and for the actual bottom sheet to close, it's pretty simple. To be fair, all you need to do is in the on top, preferably after the rest of the code has been run.

You just put navigator dot off context which has been passed in then do.com So if I was to do that, so I go back, if I click along, adding the triggers the open alarm print, and then it closes it. So let me demonstrate one more time, click and it closes it for the map. It doesn't close it because I haven't implemented this yet. So that's how you make a closing once you select the item you may want that you may know. So that's really, if you have any questions, feel free to drop me a message and as usual, I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.