Tag Archives: dart

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 »

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 »