What I learned today in flutter #1 !!

in hive-185836 •  3 years ago 

What I learned today in flutter #1 !!

Screen Shot 2021-06-05 at 8.06.36 PM.png

This is what needed to be done. So first I thought of using Tabbar but instead I made this using PageViewer in flutter.

Let's break it down into components.

The upper section here is categories of staff and under those categories are lists of staff.

carbon (3).png

This is the response sample.

Lets convert it into model.

carbon (4).png

carbon (9).png

Now lets implement it in our actual code. This part covers the list of staff’s category.

carbon (5).png

I have created widget and named it _buildIcon to make each item.

carbon (6).png

Now lets create pageview for staff’s list.

carbon (7).png

Packages that i used to create this screen are

cached_network_image
get:
velocity_x:

So here is the entire code

carbon (8).png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!