CupertinoPopupSurface — All Cupertino Widgets

In this series, we look at the whole Cupertino package of Flutter. You will get to know every widget, crucial classes, and much more in this series. All the articles will be less than 2 minutes long, so you can read them every time :) In addition to that, they will be effortless to understand, following the motto

Make everything as simple as possible, but not simpler. ~ Albert Einstein

If you want to check out the other articles of this series, check out this list. Let’s get started!

Happy reading!

CupertinoPopupSurface

CupertinoPopupSurface is simply an iOS-styled modal bottom sheet. It is very easy to use, so let’s take a look at it:

First, there is the child property, so just the widget on top of the surface.

But there is another property called isSurfacePainted. What does that mean?

This property specifies, whether to paint a translucent white to the background or not.

The flutter documentation suggests the following:

isSurfacePainted should be true for a typical popup that contains content without any dividers. A popup that requires dividers should set isSurfacePainted to false and then paint its own surface area.

Great, and this is all you have to know. Let’s take a look at a code example:

Further reading & Conclusion

In this article, you have learned how to use the CupertinoPopupSurface widget.

Did you know that there are great packages that enhance your development enormously? For example Freezed, Isar, or Flutter Hooks. If you want to learn about these great packages, I have entire tutorials about them. Check them out here.

In the following few articles, I will introduce more Cupertino widgets, essential classes, and more stuff. If you don’t want to miss this, I recommend you follow me!

Thanks for reading, have a nice day!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tomic Riedel

Flutter, Dart & Appwrite Developer | Livelong learner | Happy about sharing my knowledge