Flutter Food Delivery App – part 3 (Recent Orders)

Recent Orders

Put recent orders as the next item in the widget array.

home_screen.dart

Create our basic RecentOrders class by typing: stl + tab. Then enter RecentOrders for the class name.

We then return an instance of a column.
We create an array of widgets and assign it to the children property.
Our first widget will be Text, which says Recent order. We give it some Text styling.

Creating list and filling it with the user’s food data

We then want to create a ListView and fill it with some basic text. Like so:

Making it horizontal and having clipped Rounded Corner Images

Putting text in and spacing them correctly

Putting in the Add button

Push Our button to the right

Now in order to push the add button all the way to the right side, we need to wrap:
1) our image
2) our column of texts

in a row widget.

Then, we can use the property of our main axis alignment for our larger row container.

Text Overflow

Wrap our Texts Container, and outer Row Container in a widget called Expanded