Posts for flutter

Center Widget Horizontally In Flutter

In this article, you will learn How To Center A Widget Horizontally. Creating Widgets Here, you have a Scaffold with Row widget which you will use to center a widget. There is a property i.e mainAxisAlignment and this property takes the MainAxisAlignment function. To center a widget you can use MainAxisAlignment.center method. And in this […]

March 5, 2021 in Code examples

Use HEX Colors In Flutter

In this article, you will learn How To Use HEX Colors In Flutter. Use HEX Color As the Color() function takes int value as a parameter, we can use HEX Code by adding 0xff before the HEX and by removing the # (hash). And in this way, you can use HEX colors in Flutter. You […]

March 4, 2021 in Code examples

Change Navigation Bar Color In Flutter

In this article, you will learn How To Change Navigation Bar Color In Flutter. Importing Services From Flutter In order to change the Navigation Bar Color, you need to import the Services package from Flutter. Changing Color To change color you have to use SystemChrome function with setSystemUIOverlayStyle() method, it takes SystemUiOverlayStyle() as parameter. After […]

March 4, 2021 in Code examples

Change Status Bar Color In Flutter

In this article you will learn How To Change Status Bar Color In Flutter. Import Services To change the Status Bar color you need to import Services from Flutter. Changing The Status Bar Color To change the Status Bar Color you have to use the SystemChrome function with the setSystemUIOverlayStyle method, after that, it takes […]

March 3, 2021 in Code examples

Update State In Flutter

In this article, you will learn How to Update the State in Flutter. Creating State Above you have a empty Stateful widget with empty container. Creating Variable Here you have created a variable which you will change when button is clicked. Creating Button Above you have an OutlineButton() with onPressed. To change the state you […]

March 2, 2021 in Code examples

Center Vertically In Flutter

In this article, you will learn How To Vertically Center almost any Widget in Flutter. Creating Widget Sometimes a situation occurs where you only need to center a widget vertically. You can use the Center widget but it centers both horizontal and vertical. If you have a list of Widgets you can use Column widget […]

March 1, 2021 in Code examples

How To Navigate To Other Screens in Flutter

In this article, you will learn How To Navigate To Other Screens in Flutter. In Flutter you don’t need to install any third-party packages or dependencies. Navigation comes out of the box in Flutter which great compared to React Native. Creating Screens main.dart Here, you have the Screen1 Widget with Center & Column widget. After […]

March 1, 2021 in Code examples

Scaffold Widget In Flutter

In this article, you will learn How To Use Scaffold Widget In Flutter. What Is Scaffold Widget Scaffold Widget gives you the Material Design of your app. It gives you all the basic things which you need in a Mobile App like Tabs, App Bar, Drawer, Navigation, etc. Create Scaffold Widget The material package which […]

February 28, 2021 in Code examples

How To Remove Debug Banner In Flutter

In this article, you will learn How To Remove Debug Banner In Flutter. Creating Material App Here, you have a simple Material App with a Scaffold. To remove the debug banner there is a property in MaterialApp() which is debugShowCheckedModeBanner, it takes the boolean value, if you want to hide the banner just assign it […]

February 28, 2021 in Code examples

Change AppBar Height In Flutter

In this article, you will learn How to change AppBar Height in your Flutter Application. Creating AppBar main.dart Here, you have a simple Scaffold with AppBar. If you want to add extra height to your AppBar you have to use the PreferredSize() widget as AppBar doesn’t have height property by default. PreferredSize have two properties […]

February 26, 2021 in Code examples

Splash Screen In Flutter – Example

In this article, you will learn How To Add Splash Screen To Your Flutter Application. Installing Package Adding Splash Screen to your Flutter Application is very easy with this package that we will use in this article. pubspec.yaml After adding the dependency, save the YAML file and it will automatically install files. Using The Package […]

February 26, 2021 in Code examples

Add Padding to Widget in Flutter – example

In this article, we will learn How To Add Padding To Any Widget In Flutter. Creating Padding Widget Above we have Container as the parent widget and the child is Padding() widget, it has a padding property that takes EdgeInsets with all() and other method with the float value (amount of padding). The Padding widget […]

February 25, 2021 in Code examples

Adding Rounded Containers In Flutter

In this article, you will learn How To Add Rounded Containers or Corners to Widgets In Flutter. Import Material Package We will first import the Material Package from Flutter in order to add material design to our Flutter App. Adding Material App To the main function Here we have created the main function which is […]

February 24, 2021 in Code examples

Implement a Bottom Sheet Component in Flutter

A new trend in mobile application development all around the world is that Developers and product designers make use of the bottom sheet for interactions that do not require a full screen interface to handle its operation.  Use cases like entering your email to subscribe to particular blog notifications, or entering your card details to […]

July 8, 2020 in Android & Flutter