How to create rounded buttons in Flutter

Share this post

There are many ways to create and use rounded buttons in Flutter, but I’m going to show you some ways that work great in my opinion. Rounded button using RoundedRectangleBorder This method is very easy, we just need to use a RaisedButton and give it a shape with RoundedRectangleBorder. The button above already has all […]

Sizing widgets relative to parent/screen size in Flutter

Share this post

Oftentimes we don’t want our widgets to have a specific width or height, but rather have a width or height that is relative to the parent. For instance, we want a container to take 65% of the screen width or two containers that each taking respectively 70% and 30% of parent width. These are just […]

How to save to local storage (shared preferences) in Flutter

Share this post

To save to local storage or Shared Preferences (as it’s called in Android) in Flutter, you can use the shared_preferences plugin. First of all, you have to add the dependency to your pubspec.yaml file: Writing data to local storage in Flutter You can write data to local storage is easy. We just need to get […]