Android mobile app for Prestashop ecommerce
August 10, 2020Flutter framework for Android and iOS development
September 2, 20201. Flutter
Flutter is an open-source and free mobile user interface framework using which one can use one programming language and one codebase to create applications for android as well as for iOS platform. Flutter was created by Google and it was released in May 2017.2. Necessary skills for flutter development
The following are skills required by a developer for flutter development: i. Knowledge of Dart programming language. ii. Basics of JAVA/Kotlin programming language. iii. Knowledge on XML. iv. Should be familiar with android studio and visual studio code. v. Knowledge related to github. (Optional)3. Create flutter applications
Here are some steps to create flutter application using visual studio code:
i. Open visual studio and click command palette.
ii. Click or type flutter new project.
iii. Type name of the project to be created and select the folder location in your PC for the project.
iv. After selecting the location visual studio creates a demo flutter application by default.
v. So, let us run the default application by typing flutter run command in the terminal of the VS code or by clicking run in VS code.
4. Creating a login page in flutter
Steps to create login page: i. Create a main.dart file. ii. Create a stateless or stateful class based on your functionality inside the main.dart file. iii. Import materail library. iv. Define main() method and inside it initialize the created stateless or stateful class created. v. Inside the build MaterialApp widget is defined and Scaffold is assigned in the home parameter. vi. Inside the body paramter of the Scaffold widget padding is defined and a conatiner is created inside it. vii. Inside the container column widget is defined and two textfeilds and one button is created or listed inside the column widget.The application runs from void main() method so it is mantadory to define main() method in a dart file.
In the UI the whole page in nested inside the MaterialApp widget and scaffold widget. Inside the scaffold widget the top most blue coloured bar in the UI is the app bar and below the app bar whole body is inside a container widget. Inside the container widget a column is defined and two textformfeilds and one button is created aliging vertically. Inside the login button a row is defined and the text (“login”) and the arrow is aligined horizontally to each other inside the button.
5. How to test flutter applications?
Flutter applications can be tested either by using android studio or by using visual studio code as an IDE. When an application has many features it is harder to test the application manually so automated testing is preferable. There are three types of automated testing and they are as follows:
i. Unit testing
ii. Widget testing
iii. Integration testing
i. Unit testing
The term unit is another name for a function, method or class. In unit testing a single function, method or class is tested. The goal of unit testing is to verify the correctness of a unit logic under a variety of conditions.
Steps for unit testing in flutter are as follows:
- Add test dependency
- Create a test file
- Create a class to test
- Write the unit test in test file
- Combine multiple tests in a group
- Run the tests
- Add flutter_test dependency.
- Create widget to test.
- Use the function testWidgets( ) and define a test.
- Use WidgetTester to build a widget.
- Use Finder to search for widget.
- Use Matcher to verify the widget.
- First create an application for testing.
- Add flutter driver dependency.
- Create test files.
- Instrument the application.
- Write the tests.
- Run the tests.
6. How to test flutter developer?
Following are the ways to test flutter developer:
- As, flutter was just released at the end of February 2018, it is just a young framework so there are not many developers with enough experince in flutter so to hire a flutter developer his/her maximum experience in flutter framework should be of one or one and half year. Has s/he got minimum of one year of experince in flutter development?
- Does developer know the concept of state mangament in flutter?
- Has the developer got knowledge related to BLOC pattern or provider package?
- Is the developer familiar with the concept of Row and Column layout in flutter?
- Has the developer woked with APIs or with firebase?
- Does the developer have the knowledge related to SQL queries?
- Has s/he built at least two medium range applications using flutter?
- Is the flutter developer familiar with JAVA/KOTLIN/SWIFT programming language?
- Has the developer worked in a team?
- Is the flutter developer familier with any of the software methodologies?
- Does s/he have proper knowledge on using github?
- Is the flutter developer creative?
From the above statements and points it is clear that a flutter developer must have knowledge in either JAVA or Kotlin or Swift. At last flutter developer should have atleast one year of experience.