Posts for Jatin Hemnani

Prerender Page In Svelte Kit

In this article, you will learn How To Prerender Page In Svelte Kit. Prerendering Page To prerender the page you have to add a script tag with context of module. In this way, Svelte Kit will know which page to prerender. Prerendering will generate HTML files at the build time. Result Above you can see […]

June 29, 2021 in Code examples

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

How To Use Svelte Flip Animation

In this article, you will learn How To Use Svelte Flip Animation. Importing the Flip Animation Here, you have imported the Flip animation from Svelte. Using The Animation To use the Flip animation you have to add an animate property to the HTML element inside the {#each} block. Now, after running this code each time […]

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

Learn How To Use Svelte Store

In this article, we will Learn How To Use Svelte Store. What Is Store A Store is an object which has methods like subscribe, update and set. If you want to pass some values with other components, you can do it with props or dispatching events but sometimes it gets complicated if your app is […]

February 25, 2021 in Code examples