SliverAppBar

6 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
€93.71
List Price:  €131.20
You save:  €37.49
£80.83
List Price:  £113.17
You save:  £32.33
CA$137.98
List Price:  CA$193.17
You save:  CA$55.19
A$155.84
List Price:  A$218.18
You save:  A$62.34
S$136.11
List Price:  S$190.56
You save:  S$54.45
HK$783.06
List Price:  HK$1,096.32
You save:  HK$313.25
CHF 91.04
List Price:  CHF 127.46
You save:  CHF 36.42
NOK kr1,101.67
List Price:  NOK kr1,542.39
You save:  NOK kr440.71
DKK kr700.10
List Price:  DKK kr980.18
You save:  DKK kr280.07
NZ$169.82
List Price:  NZ$237.75
You save:  NZ$67.93
د.إ367.23
List Price:  د.إ514.14
You save:  د.إ146.90
৳10,949.65
List Price:  ৳15,329.95
You save:  ৳4,380.30
₹8,336.20
List Price:  ₹11,671.02
You save:  ₹3,334.81
RM478.35
List Price:  RM669.71
You save:  RM191.36
₦129,687.03
List Price:  ₦181,567.03
You save:  ₦51,880
₨27,766.58
List Price:  ₨38,874.33
You save:  ₨11,107.74
฿3,678.37
List Price:  ฿5,149.86
You save:  ฿1,471.49
₺3,248.23
List Price:  ₺4,547.65
You save:  ₺1,299.42
B$520.25
List Price:  B$728.38
You save:  B$208.12
R1,929.28
List Price:  R2,701.08
You save:  R771.79
Лв183.63
List Price:  Лв257.09
You save:  Лв73.46
₩137,435.75
List Price:  ₩192,415.55
You save:  ₩54,979.80
₪378.17
List Price:  ₪529.45
You save:  ₪151.28
₱5,756.72
List Price:  ₱8,059.64
You save:  ₱2,302.91
¥15,460.95
List Price:  ¥21,645.95
You save:  ¥6,185
MX$1,709.87
List Price:  MX$2,393.89
You save:  MX$684.02
QR364.04
List Price:  QR509.67
You save:  QR145.63
P1,385.73
List Price:  P1,940.08
You save:  P554.35
KSh13,119.90
List Price:  KSh18,368.39
You save:  KSh5,248.48
E£4,821.99
List Price:  E£6,750.98
You save:  E£1,928.98
ብር5,668.96
List Price:  ብር7,936.77
You save:  ብር2,267.81
Kz83,691.63
List Price:  Kz117,171.63
You save:  Kz33,480
CLP$95,228.57
List Price:  CLP$133,323.80
You save:  CLP$38,095.23
CN¥723.85
List Price:  CN¥1,013.42
You save:  CN¥289.57
RD$5,887.60
List Price:  RD$8,242.88
You save:  RD$2,355.27
DA13,457.95
List Price:  DA18,841.67
You save:  DA5,383.72
FJ$227.72
List Price:  FJ$318.82
You save:  FJ$91.09
Q775.98
List Price:  Q1,086.41
You save:  Q310.42
GY$20,874.15
List Price:  GY$29,224.64
You save:  GY$8,350.49
ISK kr14,084.15
List Price:  ISK kr19,718.37
You save:  ISK kr5,634.22
DH1,010.74
List Price:  DH1,415.07
You save:  DH404.33
L1,790.82
List Price:  L2,507.22
You save:  L716.40
ден5,773.75
List Price:  ден8,083.48
You save:  ден2,309.73
MOP$804.95
List Price:  MOP$1,126.96
You save:  MOP$322.01
N$1,917.07
List Price:  N$2,683.98
You save:  N$766.90
C$3,695.63
List Price:  C$5,174.03
You save:  C$1,478.40
रु13,325.78
List Price:  रु18,656.63
You save:  रु5,330.84
S/372.26
List Price:  S/521.17
You save:  S/148.91
K380
List Price:  K532.02
You save:  K152.01
SAR375.10
List Price:  SAR525.15
You save:  SAR150.05
ZK2,561.66
List Price:  ZK3,586.43
You save:  ZK1,024.76
L466.89
List Price:  L653.66
You save:  L186.77
Kč2,369.71
List Price:  Kč3,317.69
You save:  Kč947.98
Ft37,037.68
List Price:  Ft51,854.23
You save:  Ft14,816.55
SEK kr1,091.25
List Price:  SEK kr1,527.80
You save:  SEK kr436.54
ARS$86,776.81
List Price:  ARS$121,491.01
You save:  ARS$34,714.19
Bs690.90
List Price:  Bs967.28
You save:  Bs276.38
COP$391,948.05
List Price:  COP$548,742.95
You save:  COP$156,794.90
₡50,105.09
List Price:  ₡70,149.13
You save:  ₡20,044.04
L2,463.18
List Price:  L3,448.55
You save:  L985.37
₲738,132.47
List Price:  ₲1,033,414.98
You save:  ₲295,282.51
$U3,839.04
List Price:  $U5,374.81
You save:  $U1,535.77
zł404.45
List Price:  zł566.25
You save:  zł161.79
Already have an account? Log In

Transcript

Hello, in this video, I am going to show you a sliver app bar. So what's a sliver app bar? So what you see right here, this, you know, regular sort of app boss level one, level two, not only have a bigger one, but have you ever, I'm sure you you've used an app where you've got quite a big upper. And when you start scrolling on the page, the app bar gets smaller, and he goes to basically this site. That's what we're going to implement. And that's really great for less than showcasing something and then you can hide it afterwards and reveal what's going on wrestler agents like this a very effective technique.

So in the widget build build context area, you want to remove this return because we're not having a scaffold. It is you know, something totally different. So what we need to do is put return custom scroll view. So you will need a custom scroll view which will actually be the automatic scrolling menu. So here you have your no safety bar. So what you need to do is put liveness and then we just put a sliver bar so instead of our regular power press liberal in here we can provide a few different pins equals true banded height.

And this is 150. Obviously, you can experiment and find what works best for you. We say flexible space, flexible space bar. And inside of here, we can just put essentially some basic property like no backgrounds, and Tebow was going to deal with title. So title, it was a text and epic must be epic. said that, let's see what we get.

So yeah, so I think the big at the moment, we can't do any scrolling because we don't have anything to scroll on. And you know, obviously you can modify this, you know the way you want to, and there's some really good other features, or what I'm going to do provide a link to the official documentation. So you can see all of you know, the little nuances that you can customize in custom scroll views and sliver above. Next, what we need to do is add you know, what we're actually scrolling through there's a whole heap of stuff that you know, different types of items we can add, you can add a sliver list, you can add a sliver fixed extent lists, livid grid, you can have a whole heap of other stuff, that's totally up to you the type that you add, and the link that I provide for the official documentation will explain all of that and keep it simple and add a sliver fixed extent list which is basically a list.

So if I put labor six extent lift and in here What we need to do is call item extent. And we can 50 zero and we need to have a delegate. So the delegate will essentially be you know, all of our children in this sliver, sliver, child builder delegate. And then in era we need to build context similar to what we've got here pretty much exactly the same build context and context. And next we need a integer index. So this is just depending on what list item it is to return return container I see the problem, we need curly braces.

And then inside of here we need to return which are regular brackets. And because this is a container, let's put some clothes here there. Because this is a container, you can add essentially, whatever you want in your container. So I'm just gonna do an alignment. So I'm gonna align everything in the Center Alignment center. Let's do let's see what we got.

Let's do soya an accent that looks interesting. And we use that before and now. The next what we want to do is add a child. So here we had one child to just be a pretty simple one. Or what you could do is simply like add a column or a row, which allows you to have multiple children inside of it. At the same time, this added text item and this is a list item, put dollar index your printer, you know the number of the index, then we run it.

I think he's changed. And if we scroll, you can see that this has also changed as well. So we can keep scrolling through it. We do not specify, you know, a child count. They'll just be unlimited items. So let's specify the child for the child can we can do that.

Really simply buy after the comma, count and that's it. We put 20 we get 20. It might be thinking why do you say 19 instead of 20. And that is simply because remember, it starts at zero. So there are 20 items today. And that really is it.

Obviously the way you to, you know, customize your container in terms of color. In terms of the children, if you want to have a row in there, I'll recommend that they'll have multiple other children child widgets inside of it. So you could have an image, you could have some text, imagine if you'd like some sort of blog post or some sort of social networking app. And that's really so applied a link a link with the video for the custom code, so you can check it out for yourself. If you have any questions, feel free to pop 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.