Google search engine
Home Blog Page 37

Hive NoSql Database

0

For those who don’t know about NoSql?

NoSQL, which stands for “not only SQL,” which is an alternative of traditional relational databases in which data is placed in tables and data schema is carefully designed before the database is built. NoSQL databases are especially useful for working with large sets of distributed data.

What is Hive?

Hive is a lightweight, NoSQL database, easy to implement and also having high benchmark on the devices and written in the pure dart. Until and unless you need to model your data with many relationships, in that case it recommended to use SQLite.It has no native dependencies (it runs on Flutter Web!) can be the best option. Hive supports all platforms supported by Flutter.

Hive having the concept of boxes(which store data). A Box has to be opened before use. In addition to the plain-flavoured Boxes, there are also options which support lazy-loading of values and encryption.

What are Boxes?

All data stored in Hive is organized in boxes. A box can be compared to a table in SQL, but it does not have a structure and can contain anything. For a small app, a single box might be enough. For more advanced problems, boxes are a great way to organize your data. Boxes can also be encrypted to store sensitive data.

Before you can use a box, you have to open it. For regular boxes, this loads all of its data from the local storage into memory for immediate access.

var box = await Hive.openBox<E>('testBox');

To get an already opened instance, you can call Hive.box('testBox') instead. It doesn’t matter though if you try to call openBox multiple times. Hive is smart, and it will return an already opened box with the given name if you’ve previously called that method.

To prevent holding unnecessary data in memory, you can close the box when you are done with your box. Don’t worry if you forget to close the boxes . Smarty Hive do it for you. Its also has a handy method for closing all the box.

Hive supports all primitive types, List, Map, DateTime, BigInt and Uint8List. Any object can be can stored using TypeAdapters.

In this, we are covering how to save a custom object(Employee)showing Basic CRUD operations:

Adding Dependencies:

dependencies:
flutter:
sdk: flutter
  # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons:
hive: latest version
hive_flutter: latest version
path_provider:

dev_dependencies:

flutter_test:
sdk: flutter
hive_generator:
build_runner:

Initializing and Registering Adapter:

Box _employeeBox;

@override
void initState() {
super.initState();
Hive.registerAdapter(EmployeeAdapter());
_openBox();
}


void _openBox() async{
var dir = await getApplicationDocumentsDirectory();
Hive.init(dir.path);
_employeeBox = await Hive.openBox('employeeBox');
}

Under the hood, Hive works with binary data. It cannot recognise it

Box boxObject = await Hive.openBox('employee');
boxObject.add(Employee("paras" ,62));

its throws exception. or we save this by making it TypeAdapter.

import 'package:hive/hive.dart';
part 'employee.g.dart';

@HiveType(typeId: 1)
class Employee {

@HiveField(0)
final String name;

@HiveField(1)
final int id;

Employee(this.name, this.id);

}

And in Terminal type :

flutter pub run build_runner build part ’employee.g.dart

and you are done. This will generate you a TypeAdapter.

Save (Add)

We open the Box at the time of Initialization.

_employeeBox.add(Employee(employeeNameController.text, employeeHobbyController.text));

To show saved data in List (READ)

ListView.builder(shrinkWrap: true,
itemCount: _employeeBox.length,
itemBuilder: (context ,index)
{
final employee = _employeeBox.get(index) as Employee;

return Container(
margin: EdgeInsets.symmetric(vertical: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Text("${employee.name}",style: TextStyle(fontWeight: FontWeight.w400 ,fontSize: 15),), Text("${employee.hobby} ",style: TextStyle(fontWeight: FontWeight.w400 ,fontSize: 15),),
],
),
);
},)

For Updating and Deleting we use putAt() and deleteAt().

Link for repository:

https://github.com/parasarorahere/Hive-Database.git

Thanks for reading this article if you find anything that could be improved please let me know, I would love to improve.

From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us
And read more articles from FlutterDevs.com


FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, and Twitter for any flutter related queries.

Push Notification In Flutter | FireBase

0

Google recently announced that more than over 2 million Developers Worldwide have laid their hands on Flutter. After the language’s roll-out at the Google I/O ‘18, This revelation from the search giant immensely Signifies diversion of developers from Native development to the Newer Technologies Building Extensive Cross-Platform Apps. Flutter started its life as an open source UI framework that helps developers build native interfaces supporting different device sizes, pixel densities & orientations creating magnificent digital experience.

In this Article ,We will have a look at How to send Push Notification in a Flutter project through the help of firebase its features and customisation available:

Introduction to Push Notification:

Push Notification is a Infallible medium of alerting app users of Information they might have opt-in from apps and services . It is also a prominent retention medium to drive User-Engagement for the apps that might have gone Unnoticed after their being Installed .

Firebase Cloud Messaging (FCM) avails a comprehending set of online tools to send notifications to the user audience intended . You can always select your target audience for the push notification on the basis of firebase predictions to dynamically segment your user & the engagement you’re trying to recieve by always keeping in sight of their relative number from the total user base. We Intend To learn Sending messages to a flutter app and the role of back-end cloud function & firebase analytics in their being broadcast notification to a Single User|Segmented Audience creating a pipeline for Push Notifications.

FCM push notifications can be comprehended to be of three types:

: Token Based Notification- This can be sent with help of user device token for sending notifications on the basis of Individual User Activities .

: Topic based Notification- This kind of Push Notification is sent for subscription based notification to the users that user might have opted-in .

: Segment based Notification : Sending Notification on the basis of firebase analytics to a segment of your user .

Firebase Cloud Messaging Project Creation

In order to send Push Notification ,We need to create a firebase project for the Firebase Cloud Messaging from firebase.google.com by logging in with your google account. This brings us to the following screen::

Add project at Firebase Console

Click on Add Project Button (+) initiating firebase project creation process.

Mention Name of project

Select the appropriate name for the project entering continue further

select analytics (if needed )

You can either select the firebase analytics and then clicking on Continue Project. Firebase messaging is now created and ready to use .

Firebase project created

This Progress indicator will show before the dashboard indicating success.

Dashboard Screen

In the project overview page, click the iOS icon to launch the setup workflow as we now needs to register your flutter project for the android and iOS application. .

Integration with iOS App

Enter iOS Bundle ID

Enter the iOS bundle ID which can be founded also at info.plist of being the next line after CFBundleIdentifier.

Make sure you enter the correct ID As this can’t be edited further at the moment .

Download GoogleService-Info.plist

Next step , We need to download the config file named as GoogleService-info.plist & repeating the similar process to register your android app there savoing the Google-service.json file .Keep those configuration files in ready-to-use with Flutter app later.

Click Project setting from the option further. Select Cloud messaging noting down the server key signified there.

Flutter Application Setup with FCM

Create a new Flutter Project making sure application name is same as package or bundle ID at the time of firebase project creation

Open pubspec.yaml entering the firebase messaging dependencies :

dependencies:
firebase_messaging:           <add-latest-version>
device_id: <add-latest-version>

Android-specific configurations

: Open build.gradle of android section. In the dependencies section add :

dependencies {classpath 'com.google.gms:google-services:4.3.3'}

: Open android/app/build.gradle . In the dependencies section add the following & In the end enter the required plugin as shown up:

dependencies {
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-messaging:20.1.5'
}
apply plugin: 'com.google.gms.google-services'

Add the following intent filter inside of the activity element of your AndroidManifest so that when user taps in Content is Being Displayed.

<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

Add the google-services.json file previously downloaded by putting the file in android/app of your project file folder.

iOS Specific Configuration:

We need to register our app seperately in the firebase project for its configuration for iOS apps:

: In Xcode , Open ios/Runner/Runner.xcodeproj and check whether the Bundle identifier at general section is same from the Bundle Id entered at the Project , otherwise edit this to make them similar and Register.

: Enter the Downloaded GoogleService-Info.plist from the firebase console into Xcode project within Runner:

Important Note: Do not just copy the folder without the help of Xcode by simply copy-pasting outside of Xcode as this will likely not work

Adding Firebase SDKs

  1. Create a Podfile if you don’t already have one:
$ cd your-project-directory
$ pod init

2.Install the pods, then open your .xcworkspace file to see the project in Xcode:

pod install
open your-project.xcworkspace

3. Initialize Firebase in your app:

Import the Firebase module in your UIApplicationDelegate

import Firebase

Configure a FirebaseApp shared instance, typically in your app’s application:didFinishLaunchingWithOptions: method:

// Use Firebase library to configure APIs
  FirebaseApp.configure()

FCM Notification Types:

  1. Individual Device Token Based Notification : Personalised notification are most used for sending Push Notification as they are more apt and specific to Key needs of the user being sent on the basis of analytical methods . Though they are being sent mostly in the form of Cloud Functions but you can also send them from the firebase console which is depicted below:

In the Grow Section , Select Cloud Messaging option after this you will see a prompt to Send your first message

Cloud Messaging

Enter the Notification title & description text . We can also add the Notification Image as depicted . Before Sending the notification message a user can always preview the notification in (expanded & Initial state) the notification will likely be shown on devices.

Individual Push Notification

The only thing needed right now to send the notification is the device token which can be availed by using the device_id plugin at the dependencies:

final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();

@override
void initState() {

super.initState();


Future.delayed(Duration.zero, () {
this.firebaseCloudMessagingListeners(context);});}

void firebaseCloudMessagingListeners(BuildContext context) {
_firebaseMessaging.getToken().then((deviceToken) {
print("Firebase Device token: $deviceToken");

});
}

Device token obtained from the flutter code can be entered for the push notification enabling device specific Push Notification.

Device token

2. Segmented User Based Notification: Segmented notification are sent on the basis of various factor : country, last app engagement , user audience . Firebase Prediction Tools comes out handy for this making possible by studying your app’s analytics helping you in driving campaign driving better user engagement.

: After Successfully Entering the Notification Details . You need to select the segment of user audience on the basis of various tools alongwith firebase prediction that use your analytics to drive user campaign most suitable .

Segmented Push Notification

You will then see the preview for the segmented notification . Publish here for successfully sending of the notification.

Preview

3. Topic based Notification: Topic based notification are another personalised way of sending notification that may have opted in for a particular services . This can be done either in the background or by manually making the user subscribing to a service offered.

MaterialButton(
child: Text('Subscribe to FlutterDevs'),
onPressed: () => _fcm.unsubscribeFromTopic('FlutterDevs')
),

Here, If the User taps on the button will result in him subscribing to the topic FlutterDevs which maybe later used for sending notification on the topic .

This will result in sending notification to the subscriber of ‘FlutterDevs ’ topic.

preview

All Push Notification were recieved to the Intended Users:

Closing Thoughts:

We have Surely realised the Importance of Using Push Notification for our mobile apps quite apparently and It’s Integration with Firebase really Alleviates the problems of many apps getting unnoticed after being installed being a great retention medium for them .Firebase facilitate multiple services collection availed at a single place such as storage, cloud functions, real time databases, authentication. Hope After reading the article you must have gotten an insightful of Push Notification in Flutter with Firebase. Give it a TRY!!


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:

And read more articles from FlutterDevs.com

FlutterDevs has been working on Flutter from quite some time now. You can connect with us on Facebook and Twitter for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸

www.flutterdevs.com

UI Testing in Flutter

0

Introduction

In this post, we shall discuss about the flutter UI testing. Testing the UI of the app is an essential part of a developer side. It ensures the developer that the code is working in the required widget tree or not.


Table of content

  1. Flutter Driver
  2. Adding dependencies
  3. Adding files
  4. Methods in Flutter Driver class
  5. Flutter driver element identification
  6. Enabling the flutter driver
  7. Writing the test
  8. Run the test

Flutter Driver

Flutter driver is a class that creates a driver that uses a connection provided by the given serviceClient, _peer, and appIsolate.

It is very similar to testing frameworks such as Selenium WbDriver, Protractor, Google Espresso.


Adding dependencies

Integrate your flutter app by adding flutter_driver dependency.

Edit your pubspec.yaml file.

dev_dependencies:
flutter_driver:
sdk: flutter
test: any

Adding Files

Create a folder test_driver and add two files in it app.dart and app_test.dart.

app_name/
lib/
main.dart
test_driver/
app.dart
app_test.dart

Method in Flutter Driver class

There are 33 methods in the flutter driver class till now.

Some of them are discussed below…

  • checkHealth

This method checks the status of the Flutter Driver extension.

This method return tow values.

  1. HealthStatus.ok
  2. HealthStatus.bad
  • clearTimelime

This method clears all the timeline events recorder.

The timeout argument causes a warning to be displayed to the user if the operation exceeds the specified timeout.

  • close

Closes the serverClient and _peer.

  • enterText

This method enters a text into an inputField that is currently focused.

  • forceGC

Force a garbage collection run in the VM.

  • getBottomRight, getBottomLeft, getCenter, getTopRight, getTopLeft,

Return the point at the specified location of the widget identified by the finder.

  • getText

This method returns the text in the Text widget located by the finder.

  • requestData

It sends a string and returns a string.

  • screenshot

Takes a screenshot of the event.

  • tap

This method taps the widget located by the finder.

  • waitFor

Waits until the finder locates the widget.

For more info please visit this link.


Flutter driver element identification

There are 4 methods to identify the element in flutter.

  1. bySemanticsLabel()
  2. byTooltip()
  3. byType()
  4. byValueKey()

Enabling the flutter driver

app.dart file

import 'package:flutter_driver/driver_extension.dart';
import 'package:fluttertest/main.dart' as app;

void main() {
// This line enables the extension.
enableFlutterDriverExtension();

// Call the `main()` function of the app, or call `runApp` with
// any widget you are interested in testing.
app.main();
}

Add the following code into your app.dart file

This will enable the flutter driver and call the runApp method.

Writing the test

Writing the test involves the four steps…

  1. Create SerializableFinders to locate the widgets.
  2. Connect to the app.
  3. Test the scenarios.
  4. Disconnect the app.

Create SerializableFinders to locate the widgets.

final writeDataFinder = find.byValueKey("write_data");
final addDataFinder = find.byValueKey("add_data");

Connect to the app

// Connect to the Flutter driver before running any tests.
setUpAll(() async {
driver = await FlutterDriver.connect();
});

Test the scenarios

test("check health", () async {
Health health = await driver.checkHealth();
print(health.status);
});
test("flutter drive test", () async {
await driver.tap(writeDataFinder);
await driver.enterText(dummy_data);
await driver.tap(addDataFinder);
});

In the first test, we are checking the health of the flutter driver extension.

In the second method, we are testing our flutter widgets using SerializableFinders.

Disconnect the app

tearDownAll(() async {
if (driver != null) {
driver.close();
}
});

app_test.dart

https://gist.github.com/anmolseth06/2c11d58bef1860276ca7b05d533a0e81#file-app_test-dart


Run the test

Run the following command in your terminal window…

flutter drive --target=test_driver/app.dart

This command builds and launches the target app and runs the app_test.dart in test_driver/ folder.

Github Link

flutter-devs/Flutter-UITesting-Demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…github.com


Thanks for reading this article ❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.

If we got something wrong? Let me know in the comments. we would love to improve.


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:
And read more articles from FlutterDevs.com

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, and Twitter for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸

Design Patterns in Flutter- Part 2(MVP)

0

In the previous blog of this series, we saw what actually design pattern is and how it is different from Software Architecture. for more explanation, I would suggest you guys go through my previous blog for clearing basic concepts of design patterns.

So wrapping Design Patterns in simple lines

Design patterns are used for separating the Main code (Business Logic) from the UI part which will make your code more readable and very easy in testing.

What is the MVP?

MVP stands for Model View Presenter, As we could see that it consists of three words so talking about them a little bit.

  • Model: It is an interface defining the data to be displayed or otherwise acted upon in the user interface.
  • View: It is a passive interface that displays data (the model) and routes user commands (events) to the presenter to act upon that data.
  • Presenter: It acts upon the model and the view. It retrieves data from repositories (the model) and formats it for display in the view.

So We would be knowing more about these terms from our Demo App which shows a basic increment and decrement counters.

Communication Flow

We will see from this Flow Diagram that how model view and presenter are connected to make our code more readable and easier in testing.

MVP consists of model view and presenter and they are bonded in such a way that View in the topmost layer which is responsible for showing the data to the user and taking data from the user, Presenter being in the middle of View and Model takes the input from View and taking the data from Model. the Presenter contains the UI business logic for the View. All invocations from the View delegate directly to the Presenter. The Presenter is also decoupled directly from the View and talks to it through an interface. This is to allow mocking of the View in a unit test. The View and Model are entirely shielded from one another. The Model may raise events, but the Presenter subscribes to them for updating the View. The Model is the layer providing the data source to the user in any format.

How MVP is different from MVC?

MVP is the derivative of MVC, The key difference between MVC and its derivatives is the dependency each layer has on other layers, as well as how tightly bound they are to each other. For establishing the difference between these two design patterns, we will take the help of the flow diagram of both the design patterns to find out the difference in the way to find out how they are helpful in their own way.

As we could see from the flow diagram of MVC that the View is the one that interacts with the user, and it notifies the controller. The controller modifies some of the model based on user interaction. The Controller gets updated data on which models perform some business logic. The view gets updated once the controller passes the new data which has been received from the model. According to this, we could say about MVC that

  • Controllers are based on behaviors and can be shared across views
  • Can be responsible for determining which view to display

Now Coming to MVP, This Flow diagram shows that the flow chart is almost the same as it is in the case of MVC, but here the Controller is being replaced by Presenter. The view is the topmost layer of the architecture, interacts with the user and takes the input which is being passed to the presenter, and taking the data from the model it sends the data back to the View to present it to the user. So According to this, we could say about MVP that

  • The view is more loosely coupled to the model. The presenter is responsible for binding the model to the view.
  • Easier to unit test because interaction with the view is through an interface.
  • Usually view to presenter map one to one. Complex views may have multi presenters.

Code Understanding:

If you have not installed the flutter SDK or you are still getting familiar with it :

Let’s dive into the code part for an In-depth understanding of the process:-

1. Firstly, Create a new project and then clear all the code in the main.dart file. Type below command in your terminal:-

flutter create yourProjectName
  • Add the current latest version of MVP pattern package under the dependencies in pubspec.yaml file.
dependencies:   
mvp: ^1.0.0

Create a Model Class:

As Explained above a model class is created for both counter:-

class CounterModel {
int counter = 0;

CounterModel(this.counter);
}

Create the Presenter Class:

The Presenter is Created as this Basically Ensures the interaction with the model :

import 'package:fluttermvpdemo/model/CounterModel.dart';
import 'package:fluttermvpdemo/view/Counter.dart';

class Presenter {
void incrementCounter() {}
void decrementCounter() {}
set counterView(Counter value) {}
}

class BasicCounterPresenter implements Presenter {

CounterModel _counterViewModel;
Counter _counterView;

BasicCounterPresenter() {
this._counterViewModel = new CounterModel(0);
}

@override
void incrementCounter() {
this._counterViewModel.counter++;
this._counterView.refreshCounter(this._counterViewModel);
}

@override
void decrementCounter() {
this._counterViewModel.counter--;
this._counterView.refreshCounter(this._counterViewModel);
}

@override
set counterView(Counter value) {
_counterView = value;
this._counterView.refreshCounter(this._counterViewModel);
}


}

Adapting it Into The View :

The controller is then bound to the view.dart file so that the increment and decrement functionality may work as depicted.

class HomePage extends StatefulWidget {
final Presenter presenter;

HomePage(this.presenter, {Key key, this.title}) : super(key: key);

final String title;

@override
_MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<HomePage> implements Counter {
CounterModel _viewModel;

@override
void initState() {
super.initState();
this.widget.presenter.counterView = this;
}

@override
void refreshCounter(CounterModel viewModel) {
setState(() {
this._viewModel = viewModel;
});
}

@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(bottom: 30.0),
child: Text(
"Click buttons to add and substract.",
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
FloatingActionButton(
onPressed: () {
this.widget.presenter.decrementCounter();
},
tooltip: 'Decrement',
child: Icon(Icons.remove),
),
Text(
_viewModel?.counter.toString(),
style: Theme.of(context).textTheme.display1,
),
FloatingActionButton(
onPressed: () {
this.widget.presenter.incrementCounter();
},
tooltip: 'Increment',
child: Icon(Icons.add),
),
],
),
],
),
),
);
}
}

Find the code version on github at:

flutter-devs/Flutter_MVP_Demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…github.com

Closing Thoughts

Design Pattern is a Quintessential tool in large scale apps in native applications which you can also practice in flutter also. In this Blog, the only MVP has been explained but this will a series of blogs, and in the next blogs, we will be sharing about MVVM, CLEAN, etc.

If you have not used Design Patterns in Flutter, I hope this article has provided you with valuable information about what is all about it, and that you will give it Design Patterns — a Try. Begin using them for your Flutter Apps !!

You can find each part of this series for the posts in the links below:

From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:

And read more articles from FlutterDevs.com

FlutterDevs has been working on Flutter for quite some time now. You can connect with us on Facebook and Twitter for any flutter related queries.

We welcome feedback and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸

FlutterDevs Startup Incubator Programme

0

A whopping 150 million startup exist in the world today with new ones coming up everyday but not many can survive the paradigm shift of the fierce competition in the business — startup have to go through 2 way challenge — One from the Established Monopolistic Business that have dominated in the market place and the latter from the new Emerging ones that are regularly in the market having innovative ideas , making it highly likely to get swallowed by their shadows.

Even the greatest of the Idea will always need the guidance of a mentor in clearing the roadblocks.One other key challenges that startup have to deal up with is attributed to finances with their majorly relying on Investors that might loose interest if they discontinue showing progress at an upscale. Many of them also lacks in forming proper marketing strategy that place a vital factor in deciding the position and role of a business’s products or services in the market.They need to be resilient and focused to anticipate difficulties and pitfalls beforehand.

In Order to Help In Upscaling The StartUp with their current problems FlutterDevs has come up with a FlutterDevs StartUp Incubator programme helping startups. Let’s Know About the programme further:

FlutterDevs Startup Incubator Programme :

FlutterDevs Startup Incubator Programme is a platform being Initiated to avail a platform for newly emerging startups keeping in mind the factors needed for proper functioning of a young emerging Business availing all the facilities under a single roof which contains —

: UI/UX : Dedicated Team guiding for the technical and graphic designs of the product including aspects of branding, design, usability and function.

: SEO & Marketting : They can contribute by driving additional traffic & visibility in organic search by doing content/link/keyword research & content creation and the ability to do massive PR/Awareness/Brand campaigns giving a pedal to your startup.

: QA Testing : They can serve as an Umbrella facilitating smooth testing procedures by finding bugs or missteps thereby assuring that user requirements are met properly .

: Conceptualisation Team: Conceptualising team consist of core members that may guide about the market needs that you might need to capitalize.

: Development Team: A Profound Mobile Development Team having extensive experience in flutter development practices that are best suitable for your StartUp.

The In-House availability of all the key resources ensure efficient and control resulting in better user performance .

Why FlutterDevs?

FlutterDevs is a Full-Cycle Flutter app Development company and have leveraged this technology since its inception to deploy cutting edge apps across iOS and Android play stores efficiently.The possibilities with this Cross-Platform app development technology are endless and our Early adoption for this new Google tech has given us a platform to contribute our learning to the Community which we also consider as One of our Moral Responsibility . Some prominent ways FlutterDevs can help you strengthen your Startup are:

: Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase making the platform cost effective for development and maintenance.

: Fastening MVP (Minimum Viable Product) Creation Process to satisfy early Investors with Industry experts having Extensive Experience across multiple domains.

: 100+ Readymade Themes , plugin & module made on varied sectors ready to be integrated in your MVPs

: Give life to your amazing idea with the constant support of our excellent UI/UX team that will be involved in entire process providing meaningful and relevant experiences to users.

: FlutterDevs possess an In-House SEO And Digital Marketing team enhancing your marketing strategies & campaigns aligned with your goals.

FlutterDevs at Glance

What helps us demonstrate FlutterDevs as a Protruding Flutter App development company is that we possess an Extensive In-house Team of 30+ Flutter developers, Material Theming experts and a Proficient Cross Platform Testing including QA Analyst Team To strengthen Your Startup across various dimensions. Here is a showcase describing our flutter journey so far :

From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:

And read more articles from FlutterDevs.com

FlutterDevs has been working on Flutter for quite some time now. You can connect with us on Facebook and Twitter for any flutter related queries.

Automation Testing In Flutter

0

Google recently announced that more than over 2 million Developers Worldwide have laid their hands on Flutter. After the language’s roll-out at the Google I/O ’18, This revelation from the search giant immensely Signifies diversion of developers from Native development to the Newer Technologies Building Extensive Cross-Platform Apps. Flutter started its life as an open-source UI framework that helps developers build native interfaces supporting different device sizes, pixel densities & orientations creating a magnificent digital experience.

In this article, We will have a look at How to do Automation Testing in a project through the help of fluttering its features and customisation available:

Introduction to Automation Testing:

Testing Apps with Multiple Features is Quite Cumbersome on manual Testing. Therefore, Automation Testing comes in place ensuring the tested app is not Error-prone before publishing it. Keeping into Consideration the bug solving speed and feature Intended in the Apps are not at all Compromised. Automation Testing is Quite Eventful for large scale apps were manually testing each feature might not be suitable.

Necessity of Testing?

Testing serves as a vital part of mobile application development in finding bugs & errors promptly making sure that the application works perfectly in future with the requirements :

  • It’s a vital factor in the development process that brings to market a high-quality product.
  • It helps to guarantee an in-depth analysis of functionality.
  • The testing process requires precise planning and execution

The Flutter framework provides comprehensive support for Automation Testing of Mobile Apps.

What Comprehends Automation testing?

Automation Testing is a software testing technique making sure the requirements meet the results. Testing is done by writing testing scripts with test cases. As we know that app nowadays is multi-featured apps making it rigorously difficult to test apps but this problem is removed by Automation Testing in Flutter which makes sure your app is bug-free & Performant.

Automated testing falls into three categories mainly:

We will try to explain all about Unit and Widget Testing in the Blog with the second part of the Blog explaining about Integration testing in Flutter.

Unit testing

Unit refers to a single unit referring to testing up a single module or a class making sure the basic functionality works on multiple conditions.

  • Writing Unit tests will require the addition of test package.
  • Using a TextField Validator Class containing validator methods for email & password validation. The file can be seen in the demo by the name as Validator.dart
import 'package:automation_testing_module/utils/constants.dart';class Validator {
//email validation method
static String validateEmail(String value)
{
String pattern = r'^(([^<>()[\]\\.,;:\s@\"]+(\.
[^<>() [\]\\.,;:\s@\"]+)*)'r'|(\".+\"))@((\[[0-9]{1,3}\.
[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])'r'|(([a-zA-Z\-0-9]+\.)
+[a-zA-Z]{2,}))$'
;RegExp regExp = new RegExp(pattern);
if (value.isEmpty) {
return Constants.ENTER_EMAIL;
}
if (!regExp.hasMatch(value)) {
return Constants.INVALID_EMAIL;
} //returns null when valid return null;
} // password validation method static String validatePassword(String value) {
Pattern pattern =
r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@#\$?^&*~]).{8,}$';
RegExp regex = new RegExp(pattern);
if (value.isEmpty)
return Constants.ENTER_PASSWORD;
else if (value.length < 8)
return Constants.INVALID_PASSWORD;
else if (!regex.hasMatch(value)) return Constants.INVALID_FORMAT_PASSWORD;
return null;
}
}
  • Creating a class under test directory by name unit_test.dart.
import 'package:automation_testing_module/utils/constants.dart';
import 'package:automation_testing_module/utils/validator.dart';
import 'package:test/test.dart';
void main() {

//Email validation test
test('Email Not Entered Test', () {
var result = Validator.validateEmail('');
expect(result, Constants.ENTER_EMAIL);
});
test('Invalid Email Entered Test', () {
var result = Validator.validateEmail('akshay@aeologic');
expect(result, Constants.INVALID_EMAIL);
});
test('Valid Email Entered Test', () {
var result = Validator.validateEmail('akshay@aeologic.com');
expect(result, null);
});
  //Password validation test
test('Password Not Entered Test', () {
var result = Validator.validatePassword('');
expect(result, Constants.ENTER_PASSWORD);
});
test('Invalid Password Entered Test', () {
var result = Validator.validatePassword('1234567');
expect(result, Constants.INVALID_PASSWORD);
});
test('Invalid Password Format Entered Test', () {
var result = Validator.validatePassword('unittest');
expect(result, Constants.INVALID_FORMAT_PASSWORD);
});
test('Valid Password Test', () {
var result = Validator.validatePassword('Unittest@123');
expect(result, mull);
});
}

Above can be found is written test for Multiple Test Cases.

Run Using the following command at Terminal by:

flutter test test/unit_test.dart

Refactoring:

  • the test function is called which will create a test case with the given description and body, there are also other properties of test functions which can be used as needed but these two are appropriate to run the test.
  • We called validateEmail() method by giving null value and storing it in the result variable afterwards.
  • expect() method keep an eye whether the value passed and the expected value is similar.

Widget testingWidget Testing corresponds to the testing of the Widgets on certain circumstances which means how the widget responds on any particular event and how a widget is altered on an event occur.

  • Adding flutter_test package in pubsec.yaml. The package provides additional utilities for testing Widgets.
  • Herewith In the demo, Login Page consisting of text fields for namely email and password field is present with a Material Button. The event will occur on the tap of Material Button click event namely widget_testing_view.dart.

Code Implementation:

/media/1bccf15a228a804095203c33a34bd37d

  • If Entered data is valid and the login button is pressed a text widget will show the Valid data text.
  • Using the above widget for testing by creating a test class for the purpose namely widget_test.dart.
  • We will use the above widget for the testing and create a testing class for it named widget_test.dart
import 'package:automation_testing_module/view/widget_testing_view.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void main() {testWidgets('Login Successful',(WidgetTester widgetTester) async {

//Renders the UI from the given widget
await widgetTester.pumpWidget(LoginWidget());// Widget finders using key & type
final emailTextFieldFinder = find.byKey(Key('emailKey'));
final passwordTextFieldFinder = find.byKey(Key('passwordKey'));
final buttonFieldFinder = find.byType(MaterialButton);//enters text to the TextFormField using enterText
await widgetTester.enterText(emailTextFieldFinder,
'akshay@aeologic.com');
await widgetTester.pump();
expect(find.text('akshay@aeologic.com'), findsOneWidget);//enters text to the TextFormField using enterText
await widgetTester.enterText(passwordTextFieldFinder,
'Unittest@123');
await widgetTester.pump();
expect(find.text('Unittest@123'), findsOneWidget);//make the button click event
await widgetTester.tap(buttonFieldFinder);
await widgetTester.pump();//check for the response after button tap
final textFinder = find.text('Valid Data');
expect(textFinder, findsWidgets);

});
}

Run it by using the command flutter test test/widget_test.dart in Terminal.

Explanation:

Some prominently used methods are explained as:

  • testWidgets() function is used to create a widget test case as of test() is used in unit testing. But what it differs is the WidgetTester, it interacts with widgets and the test environment.
  • pumpWidget() function build and renders the provided widget in the test environment.
  • find() function searches for the widget using the Finder in flutter_test. The widgets can be searched using this.
  • pump() this function calls the setState() method in test environment and rebuild the widget.

So here how it goes, firstly we create a test using testWidgets() with the description and render the LoginWidget() in the test environment, once the widget is rendered the widgets are found by using the byKey() and byType() finders. Using the enterText() we input the text to the TextFormField, the button click event is called using the tap() in the test environment and if the Form validates the validDataFilled variable is set to true.

After this, we check for that the expected text is found in the widget.

Check out the demo code version on GitHub at:-

flutter-devs/Flutter_Automation_Testing
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…github.com

Closing Thoughts

This article would serve as an Exploratory article for Flutter Testing and its working using Flutter. Automation Testing is an all- Important Tool in Large Scale Apps in native applications which has now also been introduced in flutter’s latest version also. This basically Ensures Deployment of the error Free version of the App & Decrease in Development time by Preventing any Undesirable errors to occur. Automation Testing is a must-case Scenario when it’s not practically possible to test each test case.

If you have not used Automation Testing, I hope this article has provided you with valuable information about what is all about Automation Testing, and that you will give it Automation Testing — a Try. Begin using for your apps !!

From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:

And read more articles from FlutterDevs.com

FlutterDevs has been working on Flutter from quite some time now. You can connect with us on Facebook and Twitter for any flutter related queries.

We welcome feedback and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸

www.flutterdevs.com

Explore Flutter 1.17 & Dart 2.8

0

Introduction

Welcome to the new version of “WORLD OF WIDGETS” and “Dart”. In this post, we shall discuss about the new updates of flutter and dart together. Let’s explore the new changes with me in this blog.


Table of Content

  1. Dart 2.8
  2. Flutter 1.17

Dart 2.8

There are two changes made by the Dart team in the Dart 2.8 SDK:-

  1. Improves performance in Pubget.
  2. Keeps our packages dependencies up-to-date.

flutter pub updated

Here is what is got when I run the pub outdated or fluter pub outdated command from my terminal.

C:\Users\anmol seth\AndroidStudioProjects\dialog_box>flutter pub outdated
Dependencies Current Upgradable Resolvable Latest
giffy_dialog *1.6.1 1.7.0 1.7.0 1.7.0

dev_dependencies: all up-to-date

transitive dependencies
collection *1.14.11 1.14.12 1.14.12 1.14.12
flare_dart *2.3.2 2.3.4 2.3.4 2.3.4
flare_flutter *1.8.3 2.0.3 2.0.3 2.0.3

transitive dev_dependencies
archive *2.0.11 2.0.13 2.0.13 2.0.13
args *1.5.2 1.6.0 1.6.0 1.6.0
async *2.4.0 2.4.1 2.4.1 2.4.1
boolean_selector *1.0.5 2.0.0 2.0.0 2.0.0
charcode *1.1.2 1.1.3 1.1.3 1.1.3
crypto *2.1.3 2.1.4 2.1.4 2.1.4
image *2.1.4 2.1.12 2.1.12 2.1.12
path *1.6.4 *1.6.4 *1.6.4 1.7.0
pedantic *1.8.0+1 - - 1.9.0
petitparser *2.4.0 *2.4.0 *2.4.0 3.0.2
quiver *2.0.5 2.1.3 2.1.3 2.1.3
source_span *1.5.5 1.7.0 1.7.0 1.7.0
test_api *0.2.11 0.2.15 0.2.15 0.2.15
xml *3.5.0 *3.6.1 *3.6.1 4.1.0

15
upgradable dependencies are locked (in pubspec.lock) to older versions.
To update these dependencies, use `pub upgrade`.

I got the suggestion regarding my current version and also the latest version available.

We can run pub upgrade to update these dependencies.


Flutter 1.17

The following changes are made in Flutter 1.17:-

  1. Google fonts
  2. Better performance
  3. Metal Support for ios
  4. New widgets / Updated Widgets
  5. Material Text Scale
  6. App size improvement
  7. Network tracking Tools
  8. Hot reload improved
  9. Default use of Android X
  10. Samsung keyboard issue solved
  11. Updated the scrolling and text input widget

Google Fonts

This package is fantastic it provides us google_fonts API.

It provides us 977 read to use fonts without storing in our assets folder and mapped in pubspec.

Required Package

google_fonts | Flutter Package
The google_fonts package for Flutter allows you to easily use any of the 977 fonts (and their variants) from…pub.dev

import GoogleFonts

import 'package:google_fonts/google_fonts.dart';

use google _fonts

Text(
'This is Google Fonts',
style: GoogleFonts.lato(),
),

use google _fonts with TextStyle

Text(
'This is Google Fonts',
style: GoogleFonts.lato(
textStyle: TextStyle(color: Colors.blue, letterSpacing: .5),
),
),

google_fonts Theme()

MaterialApp(
theme: ThemeData(
textTheme: GoogleFonts.latoTextTheme(
Theme.of(context).textTheme,
),
),
);

Better Performance

  1. Faster and clear animation
  2. smaller apps
  3. lower memory utilization
  4. 20 % to 40 % better navigation
  5. 40 % reduction in CPU/GPU
  6. Better scrolling with less Memory Usage

Metal Support for ios

  1. Provides direct access to the GPU
  2. Reduced app frame rendering time

New Widgets / Updated Widgets

  1. NavigationRail
  2. New DatePicker
  3. Better Text Selection menu

NavigationRail()

A material StatefulWidget that is meant to be displayed at the left or right of an app to navigate between a small number of views, typically between three and five.

Properties

NavigationRail class
A material widget that is meant to be displayed at the left or right of an app to navigate between a small number of…api.flutter.dev

Example

https://gist.github.com/anmolseth06/e71626ea5540857a1dd9e2e013b3149c#file-navigation_rail_example-dart

DatePicker(), NavigationRail() and New Text input mode

DatePicker has been updated according to the material design and also text input mode.

You can see the Material Design of DatePicker : –

Material Design
Build beautiful, usable products faster. Material Design is an adaptable system-backed by open-source code-that helps…material.io

Material Text Scale

Source: https://medium.com/flutter/announcing-flutter-1-17-4182d8af7f8e

Thanks for reading this article ❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.

If we got something wrong? Let me know in the comments. we would love to improve.


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:
And read more articles from FlutterDevs.com

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, Twitter and linkedIn for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸

Local Authentication in Flutter

Introduction

Hello, I welcome you all to my new post on Local Authentication in Flutter. In this post, we shall discuss how to implement the FingerPrint in your flutter app for local authentication. So let’s start with the context.


Table of content

  1. Local Authentication
  2. Required Plugin
  3. Checking for biometric availability
  4. Checking biometric type
  5. Authentication using biometric
  6. Designing a simple App

Local Authentication

Verifying the user locally i.e. without the use of a web server, using facelock or fingerprint can be termed as Local Authentication.

  1. biometric authentication on iOS
  2. fingerprint APIs on Android

Required Plugin

Fortunately, we have a plugin managed by the flutter team.

Just go to pub.dev and search for local_auth package.

Install the dependencies in your pubspec.yaml file.

dependencies:
local_auth: ^latets version

install the dependence

Useflutter_pub_get command to install the dependence.

import the package

import 'package:local_auth/local_auth.dart';

Checking for biometric availability

final LocalAuthentication auth = LocalAuthentication();
bool canCheckBiometrics = false;
try {
canCheckBiometrics = await auth.canCheckBiometrics;
} catch (e) {
print("error biome trics $e");
}

print("biometric is available: $canCheckBiometrics");

We are using the try and catch method for checking biometric and catching errors.

initializing LocalAuthentication

final LocalAuthentication auth = LocalAuthentication();

canCheckBiometrics

bool canCheckBiometrics = false;

We have made a bool variable canCheckBiometrics which is initially set to false.

We are using it to set/update the availability of biometric.

auth.canCheckBiometrics

Here canCheckBiometrics is a method of LocalAuthentication() object which returns a boolean value.


Checking biometric type

List<BiometricType> availableBiometrics;
try {
availableBiometrics = await auth.getAvailableBiometrics();
} catch (e) {
print("error enumerate biometrics $e");
}

print("following biometrics are available");
if (availableBiometrics.isNotEmpty) {
availableBiometrics.forEach((ab) {
print("Avalible Biomatrics: $ab");
});
} else {
print("no biometrics are available");
}

getAvailableBiometrics() method returns the list of available Biometrics.


Authentication using biometric

bool authenticated = false;
try {
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Touch your finger on the sensor to login',
useErrorDialogs: true,
stickyAuth: false,
androidAuthStrings:
AndroidAuthMessages(signInTitle: "Login to HomePage"));
} catch (e) {
print("error using biometric auth: $e");
}
print("authenticated: $authenticated");

authenticateWithBiometrics() is a method that returns a dialog box to provide a message to the user to press the fingerprint sensor for authentication.

To read more about each method you can press Ctrl+B in that particular method.

Full method

void _checkBiometric() async {
final LocalAuthentication auth = LocalAuthentication();
bool canCheckBiometrics = false;
try {
canCheckBiometrics = await auth.canCheckBiometrics;
} catch (e) {
print("error biome trics $e");
}

print("biometric is available: $canCheckBiometrics");

List<BiometricType> availableBiometrics;
try {
availableBiometrics = await auth.getAvailableBiometrics();
} catch (e) {
print("error enumerate biometrics $e");
}

print("following biometrics are available");
if (availableBiometrics.isNotEmpty) {
availableBiometrics.forEach((ab) {
print("\ttech: $ab");
});
} else {
print("no biometrics are available");
}

bool authenticated = false;
try {
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Touch your finger on the sensor to login',
useErrorDialogs: true,
stickyAuth: false,
androidAuthStrings:
AndroidAuthMessages(signInTitle: "Login to HomePage"));
} catch (e) {
print("error using biometric auth: $e");
}
setState(() {
isAuth = authenticated ? true : false;
});

print("authenticated: $authenticated");
}

Designing a simple App

Github link

anmolseth06/local_auth
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…github.com


Hi, I am Anmol Gupta, a Flutter Developer, content writer, and now udemy instructor. I am a passionate application developer and curious learner and I love sharing my knowledge with others that’s why I decided to write on medium, and now I am expanding my capabilities by creating a demanding udemy course that will help Flutter Developer to learn advanced functionalities that will directly help you in landing high paying job or getting high paying clients internationally.

Who is this course for?

Want to build Flutter apps with native functionalities?

  1. Want to learn advanced Flutter functionality?
  2. Want to learn job-oriented and high-demand, high-paying flutter iOS and android functionality?

What does this course offer?

  1. Flutter Razorpay payment gateway integration: In this module, we shall learn about Razorpay payment gateway integration which will help us to process the payment of the purchases made by the user.
  2. Flutter Stripe payment gateway integration: In this module, we shall learn about Stripe payment gateway integration which will help us to process the payment of the purchases made by the user.
  3. FLUTTER SCAN AND GENERATE QR CODE: In this module, we shall learn how we can scan a QR code and generate the QR code in Flutter.
  4. FLUTTER FIREBASE EMAIL PASSWORD AUTHENTICATION: In this module, we will learn how we can perform authentication using an email password provider, we will also learn how we can verify the user’s email and reset the password.
  5. FLUTTER FIREBASE PHONE AUTHENTICATION: In this module, we will learn how we can perform authentication using a phone authentication provider, and we will see how we can send the OTP to the provided phone number and sign in using the phone credentials.
  6. FLUTTER FIREBASE GOOGLE AUTHENTICATION: In this module, we will learn how to perform authentication using the google authentication provider using firebase in flutter.

Thanks for reading this article ❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.

If we got something wrong? Let me know in the comments. we would love to improve.


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:
And read more articles from FlutterDevs.com

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, Twitter and linkedIn for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #FlutterDevs. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!.

Thank you for reading. 🌸

Why Flutter is the Best Choice for Mobile Development?

0

Let’s go In through the Blog to Know all about Flutter and why it is the optimum choice of Framework to develop mobile applications in 2020!

With 2.87 million apps in Google Play Store and 2.2 Million apps available in Apple’s app store, It is amply clear that mobile app development has become an paramount need of the hour for businesses of all domains.

With the rapidly changing market and increasing competition, it has become daunting for all-level enterprises and startups to survive in the cut-throat competitive market without having mobile apps for their business.

iOS and Android are two of the main platforms when it comes to Mobile App Development. For application development, these platforms need different types of coding each. This situation of developing two different apps for different platforms came as a problem for both Clients and Mobile app development companies.

Cross-Platform Application Development is developing mobile applications in a way that the apps run on various platforms. In this type of development, apps are built using a single programming language. Which is faster and more effective from a business standpoint.

Some of the popular frameworks for cross-platform development, one could choose a few: Xamarin by Microsoft, React Native by Facebook, PhoneGap from Adobe, Ionic, Cordova, etc. Each of these frameworks comes with multiple features along with pros and cons.

Why Should entrepreneurs consider Cross-Platform Mobile Apps

Talking about mobile application development, Enterprise and Start-up owners generally chose from Native and Cross-Platform Development.

Where Native apps are the ones that are made especially for one platform either Android or iOS then there are Cross-platform Apps that are developed to run on both the platforms in one go.

There are a lot of benefits of developing a common app for both of the major platforms — Android & iOS –

  • Lower Development Time — Cross Platform application development makes the developer write and work on a single codebase and not to make two different versions of the application, results in saving a lot of time and effort and develops the app faster.
  • Lower Testing Time — Because of developing a single application, the Quality Analyst Experts have to test the performance of one app instead of testing two different platforms with numbers of devices and operating systems
  • Reduced Development Cost — With lower development time, efforts, and lesser time in testing the app, what comes is the Reduced App Development Cost as the time allocation of the development resources lowers.
  • Lower Publishing time- Since the development of your mobile application takes significantly less time compared to a native app development process, it makes the entrepreneurs publish the app faster to the market and get an early bird benefit.

Now, not wanting to be left out of the exploding mobile market and constant improvement in technology, Google gave birth to Flutter. Flutter, google’s latest cross-platform framework for developing android and iOS apps.

Flutter was released by Google in late 2018 and ever since it has been praised all over the world for its scalability and proficiency in cross-platform app development. Now, Let’s straight-up dive deeper into understanding Flutter, it’s pros and cons, and Why Flutter is a Big Deal today.

What is Flutter ?

Flutter is an open-source UI Framework and software development kit intended to fasten and simplify the UI and app creation process. Flutter was launched with features that were missing in the previous Cross-Platform development frameworks. Flutter is Google’s open-source technology that enables the use of a single codebase for the creation of native Android and iOS apps. Rather than being a framework, it is a complete SDK (software development kit) that contains everything you require for cross-platform mobile app development.

Flutter is the only cross-platform framework that provides reactive views without requiring JavaScript Bridge. Google Developers have been rigorously working on this before making it generally usable. Here are things they worked on:

  • Support for app development on windows
  • Ability to support a greater number of Firebase APIs
  • Improved documentation
  • Internationalization
  • Supporting Chat, Ads and online videos
  • Tools for visual studio and android studio
  • Bug Fixes
  • Accessible to all types of developers.

Now that we clearly see the dominance of Flutter over every other Cross-Platform Framework, it is time to take a look at the reasons which will validate that Flutter is a striker in the market for entrepreneurs.

According to the GitHub’s OCTOVERSE report of 2019, Flutter is one of the fastest growing open source projects and it has climbed to the 2nd position.

Popular Apps Built With Flutter:

: Social Networking: KlasterMe, Pairing, Meeve
: Photo & Video: PostMuse
: Health & Fitness: Reflectly, Watermaniac
: Music & Entertainment: Hamilton, Topline, InKino, Music Tutor
: Sports: Top Goals, Dream 11
: Banking & Finance: Cryptomaniac Pro, Nubank
: Education: School Planner
: Shopping: HuYu, Xianyu
: Lifestyle: Pawfect Match
: Map & Navigation: Station La Moins Chère
: Business: Alibaba, AppTree, Google Ads
: Travel: Flydirekt
: Real Estate: Realtor.com, Emaar
: E-commerce: eBay

Why Should Startups Choose Flutter for their next big Idea?

Looking at the growing popularity of mobile apps pulls a few concerns for any app owner or a start-up:

  • With almost 3.5 billion smartphones and tabs being used all across the world in a burgeoning mobile technology market, how to launch the app with a limited budget?
  • Secondly, considering almost 300 million start-ups annually rolling out in the world, how to stand out in the crowd?

The simple answer to both the concerns is to develop your app using Cross-Platform Framework like Flutter. Moreover, flutter has been enormously popular with its impeccable User Experience with a sea full of flutter-based apps out there. One of the major use cases of Flutter is Google’s Adword app. A few other examples are Alibaba, a Chinese multinational E-commerce giant, Reflectly, Watermaniac, Tencent, Birch, and many more.

From an app owner’s perspective, developing an app in Flutter is Fast and cost-effective. There are a lot more advantages to Flutter app development.

Pros:

  • Faster App Development Process
  • Less Coding
  • Highly Reactive Framework
  • Accessible Native Features & SDKs
  • Perfect for MVP
  • Plugins Easy to Avail

What is FlutterDevs

FlutterDevs is a team of Tech Enthusiasts dedicated to making strikingly beautiful Flutter mobile applications. Profoundly committed to developing highly intriguing apps that strictly meet the business requirements and catering a wide spectrum of Design ideas.

At FlutterDevs , We have been working on the Flutter since its Alpha version which has definitely given us an edge over the others as we’ve been fondling with flutter from the very beginning. We have adopted a design first attitude which has always led to delivering the highest quality mobile applications.

We have not only been driving innovation when it comes to Flutter based applications but also committed to contribute, teach, and train the community of future developers. FlutterDevs believes in giving back to the tech community that’s why we have been adding:

  • 80+ Open Source Contribution on GitHub
  • 100 + Technical Blogs on Medium
  • Brainstorming every day with a strong 15k+ LinkedIn Followers
  • Regular meetups around the cities to learn and grow as a community
  • FlutterDevs Startup Incubator Programme is a platform being Initiated by FlutterDevs to avail a platform for newly emerging startups keeping in mind the factors needed for proper functioning of a young emerging Business availing all the facilities under a single roof. know more about the programme :-

Why Should you Chose FlutterDevs ?

At FlutterDevs, we focus on challenging our limits of user-centered design by creating evident mobile solutions.Despite our code doing all the heavy lifting, we have always known that our mighty stats can narrate our story to you beforehand. Let’s jump to it:

  • Ranked 21 globally, for the most innovative flutter developers by GitHub.
  • 40+ Readymade themes.
  • 10+ years of mobility experience.
  • 30+ Projects Delivered

FlutterDevs at a Glance!

To strengthen you across various dimensions. Here is a showcase describing our flutter journey so far:


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:
And read more articles from FlutterDevs.com

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, Twitter and linkedIn for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #FlutterDevs. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!.

Augmented Reality in Flutter

Introduction

AR core in flutter is a beautiful plugin that provides us API to implement Argumented reality in flutter application. This is one of the emerging new technologies in the market. With this plugin, we shall discuss the various features provided by this plugin the flutter, so let’s start.


Table of content

  1. Enable ARCore
  2. Installing plugin
  3. Classes provided by the plugin
  4. Making a Sphere
  5. Making a Cylinder
  6. Making a Cube
  7. GitHub Link

Enable ARCore

To enable ARCore functionality in Android Studio you need to perform the following steps:-

  1. Add AR Required or AR Optional entries to the manifest

AR Required

You need to include the following entries in your AndroidManifest.xml file:-

<uses-permission android:name="android.permission.CAMERA" />
<uses-sdk android:minSdkVersion="24" />
<uses-feature android:name="android.hardware.camera.ar" />
<application …>
<meta-data android:name="com.google.ar.core" android:value="required" />
</application>

AR Optional

<uses-permission android:name="android.permission.CAMERA" />
<uses-sdk android:minSdkVersion="14" />
<application>
<meta-data android:name="com.google.ar.core" android:value="optional" />
</application>

The difference between the AR Optional and AR Required is that AR Required app requires an ARCore Supported Devices that had Goole Play Services for AR installed in it. In AR Required apps the play store automatically stores the Goole Play Services for AR.

While in AR Optional apps can be installed and run on the devices that don’t support ARCore and also play store will not install the Goole Play Services for AR automatically.

2. Modify build.gradle

Please make sure in your projects build.gradle file includes the following code.

allprojects {
repositories {
google()

Add the following dependencies inside your app-level build.gradle file

dependencies {
implementation 'com.google.ar:core:1.16.0'
}

3. Sceneform plugin in your app-level build.gradle file

android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
dependencies {
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.8.0'
implementation 'com.google.ar.sceneform:core:1.8.0'
}

4. Enable android X

Add the following code into your gradle.properties

org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

Installing Package

arcore_flutter_plugin | Flutter Package
Thanks to Oleksandr Leuschenko for inspiration and his precious code: arkit_flutter_plugin I wrote 2 articles for setup…pub.dev

This is the plugin that I am using for my project.

Update the dependencies in your pubspec.yaml file.


Classes provided by the plugin

There are a total of 13 classes provided by this plugin until May 2020.

  1. ArCoreView
  2. ArCoreController
  3. ArCoreFaceView
  4. ArCoreFaceContrller
  5. ArCoreSphere
  6. ArCoreCylinder
  7. ArCoreCube
  8. ArCoreNode
  9. ArCoeMaterial
  10. ArCoreHitTestResult
  11. ArCoreRotatingNode
  12. ArCorePlane
  13. ArCoreReferenceNode

ArCoreView

This class returns the view type. There are two types of views in it.

  1. AUGMENTEDFACE
  2. STANDARDVIEW

There are 4 properties in it:-

  1. onArCoreViewCreated
  2. enableTapRecoginzer
  3. enableUpdateListener
  4. type

onArCoreViewCreated

This property takes a ArCoreController. We shall discuss about ArCoreController in our later section.

enableTapRecoginzer

Initially, set to false. It is used as an argument by the MethodChannel.

enableUpdateListener

Initially, set to false. It is used as an argument by the MethodChannel.

type

It is a view type, it is either AUGMENTEDFACE, STANDARDVIEW. It is set to STANDARDVIEW by default.

ArCoreController

This controller used to add a ArNode using addArCoreNode function, add a ArCoreNode with ancher using a addArCoreNodeWithAncher function and also remove node using removeNode function.

ArCoreFaceView

It is a stateful widget that returns a ArCoreAndroidView. It has two properties enableAugmentedFaces, onArCoreViewCreated.

Initially, enableAugmentedFaces is set to false.

onArCoreViewCreated takes a function with ArCoreController argument.

ArCoreFaceController

It used dispose and loadMesh method to control the FaceView.

ArCoreSphere

It is ArCoreShape, takes a radius and ArCoreMaterial.

ArCoreCylender

It is ArCoreShape, takes a radius, height, and ArCoreMaterial.

ArCoreCube

It is ArCoreShape, takes a size i.e. Vector3 and ArCoreMaterial.

ArCoreNode

This widget is used to provide the position, shape, scale, rotation, name.

ArCoreMaterial

It is used to describe the outlook of the virtual object created by the user.

It has color,textureBytes, metallic, roughness, reflection.

ArCoreRotatingNode

It is an ArCoreNode with a degreesPerSecond property which is a double value.

ArCorePlane

It takes the x, y coordinate of the plane, ArCorePose, and ArCorePlaneType.

There are three types of plane:-

  1. HORIZONTAL_UPWARD_FACING
  2. HORIZONTAL_DOWNWARD_FACING
  3. VERTICAL

ArCoreReferenceNode

It is ArCoreNode, it has all the properties that the ArCoreNode has also it has objectUrl and object3DFileName.

objectUrl

URL of glft object for remote rendering.

object3DFileName

Filename of sfb object in assets folder.


Making a Sphere

void _addSphere(ArCoreController controller) {
final material = ArCoreMaterial(
color: Color.fromARGB(120, 66, 134, 244),
);
final sphere = ArCoreSphere(
materials: [material],
radius: 0.1,
);
final node = ArCoreNode(
shape: sphere,
position: vector.Vector3(0, 0, -1.5),
);
controller.addArCoreNode(node);
}

Making a Cylinder

void _addCylinder(ArCoreController controller) {
final material = ArCoreMaterial(
color: Colors.red,
reflectance: 1.0,
);
final cylinder = ArCoreCylinder(
materials: [material],
radius: 0.5,
height: 0.3,
);
final node = ArCoreNode(
shape: cylinder,
position: vector.Vector3(0.0, -0.5, -2.0),
);
controller.addArCoreNode(node);
}

Making a Cube

void _addCube(ArCoreController controller) {
final material = ArCoreMaterial(
color: Color.fromARGB(120, 66, 134, 244),
metallic: 1.0,
);
final cube = ArCoreCube(
materials: [material],
size: vector.Vector3(0.5, 0.5, 0.5),
);
final node = ArCoreNode(
shape: cube,
position: vector.Vector3(-0.5, 0.5, -3.5),
);

controller.addArCoreNode(node);
}

main.dart file

https://gist.github.com/anmolseth06/5f2d4708d907b1327d0756f482027e47#file-main-dart


GitHub Link :

https://github.com/flutter-devs/arcoreflutter


Thanks for reading this article ❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.

If we got something wrong? Let me know in the comments. we would love to improve.


From Our Parent Company Aeologic

Aeologic Technologies is a leading AI-driven digital transformation company in India, helping businesses unlock growth with AI automation, IoT solutions, and custom web & mobile app development. We also specialize in AIDC solutions and technical manpower augmentation, offering end-to-end support from strategy and design to deployment and optimization.

Trusted across industries like manufacturing, healthcare, logistics, BFSI, and smart cities, Aeologic combines innovation with deep industry expertise to deliver future-ready solutions.

Feel free to connect with us:
And read more articles from FlutterDevs.com

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, and Twitter for any flutter related queries.

We welcome feedback, and hope that you share what you’re working on using #Flutter. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences!

Thank you for reading. 🌸