Category Archives: Flutter

Doing Simple Navigation in Flutter – Simple Example

By | October 12, 2018

Navigation is done is Flutter using the Navigator class. Lets look at a simple example The first thing you have to register routes for difference screen is to build a Map of ‘String’ (route) and the page (Widget).   Lets say I have a utility class for the Creating Routes named routes.dart. The contents of route.dart contains the… Read More »

GridView Demo in Flutter

By | October 10, 2018

Hi Friends, Today we will see how to implement GridView in Flutter.     We are going to use this service for the data First we will create a Model for the Grid Cell No we will create view for Grid Cell Create a file named “cell.dart” and copy this into it. Service Class We have the below… Read More »

Doing HTTP Calls in Flutter and Parsing Data

By | October 7, 2018

Here is a simple example of doing Http calls in Flutter. In this example we will try to fetch some JSON value from the below url https://jsonplaceholder.typicode.com/posts/1 You can read more from here. Add Dependencies First you need to add the http plugin in dependencies. The latest version of http can be found here (https://pub.dartlang.org/packages/http). Example Lets look… Read More »

Flutter – Saving Data in Local using Shared Preferences

By | October 4, 2018

This simple example demonstrates saving an integer value in the local shared preferences. We will use a flutter plugin called shared_preferences for this. You can read more about the plugin from here. Add Dependency First thing is to add the package to the dependencies. Go to pubspec.yaml and add the package. Example

SQlite Database Operations in Flutter

By | September 27, 2018

SQFlite is a Flutter library for doing local Database Operations. You can download it from here. To Integrate SQFlite library in your project In your flutter project add the dependency: You can download the sample project from here. Here is a sample DB Utility file. DBHelper.dart

How to do Unit Test of functions and Widgets in Flutter?

By | September 24, 2018

Lets see how we can test Flutter Apps. It would be easy if we continue from the previous example…   Start unit Testing We will create a test file named ‘widget_test.dart’ inside the ‘test’ folder. To test Widgets, we will use the ‘testWidgets’ function. Lets see how it will look like… The test function in MyHomePage will look… Read More »

How to show a Snackbar in Flutter? iOS and Android.

By | May 20, 2018

Here is a simple example where the user clicks a button to show a Snackbar. We know that there is no inbuilt snackbar for iOS. But Flutter makes it easy to do without any custom native code. You can see a Demo video here. Here we use two main elements Scaffold Snackbar The Scaffold Widget from the material… Read More »