Google search engine
Home Blog Page 67

Equatable In Flutter

0

We all know we can compare two things with “==” this operator, but do you know how to compare two instances of the same class?. Well, it is quite a lengthy process, comparing each instance by overriding “==” and hashCodes, and to simply that exact process we have Equatable.

In this article, we will explore Equatable In Flutter. We will implement the Equatable demo program and learn how to use the same in your flutter applications.

equatable | Dart Package
Not only is it verbose and tedious, but failure to do so can lead to inefficient code which does not behave as we…pub.dev

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

Equatable

Code Implement

Property

Uses

Code File

Conclusion

GitHub Link



Equatable:

The Equatable is used to simplify the process of comparing instances of the same object without the need for boilerplate codes of overriding “==” and hashCodes.

Using flutter equatable we can Simplify Equality Comparisons in order to compare different instances of the same class we have to override the == operator as well as hashcode. By default, == returns true if two objects are the same instance of the class.

Code Implement:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
equatable: ^2.0.3

Step 2: Import

import 'package:equatable/equatable.dart';

Step 3: Run flutter packages get in the root directory of your app.

How to implement code in dart file :

You need to implement it in your code respectively:

Create a new dart file called phone.dart inside the lib folder.

class Phone {
final String phoneName;
final String phoneImage;

const Phone({
required this.phoneName,
required this.phoneImage,
});
}

Also, Create a new dart file called main.dart inside the lib folder.

We create two phone objects,

final Phone samsung = const Phone(
phoneName: 'Samsung S20 FE 5G',
phoneImage: 'assets/phone1.jpeg',
);
final Phone iphone = const Phone(
phoneName: 'Iphone 11',
phoneImage: 'assets/phone2.jpeg',
);

Now if we try to compare these two objects, they will never be the same,

Output

but if we create two same objects,

final Phone iphone = const Phone(
phoneName: 'Iphone 11',
phoneImage: 'assets/phone2.jpeg',
);
final Phone iphone2 = const Phone(
phoneName: 'Iphone 11',
phoneImage: 'assets/phone2.jpeg',
);

and compare the two still, they are not the same because under the hood Dart doesn’t compare the objects by their value.

Output

here iPhone and iphone2 both objects are in different memory locations. It doesn’t matter if they have the same values. They both will be considered as different objects.

So, what can we do now?

Let’s use equatable for comparing two instances of the same object,

First, we extend the existing class with Equatable, and then override a getter method props.

import 'package:equatable/equatable.dart';

class Phone extends Equatable {
final String phoneName;
final String phoneImage;

const Phone({
required this.phoneName,
required this.phoneImage,
});

@override
List<Object?> get props => [phoneName, phoneImage];
}

Note: Equatable is designed to only work with immutable objects so all member variables must be final.

That’s it!!

Output

Now the two objects are the same based on their values, the prop property of the equatable is further explained below.

Property:

Equatable comes with props property which has its own purpose in object comparison.

Props property decides which objects we should consider for object comparison.Props is a getter method that will return List<Object>. HereObject can be of any type (like : int,double, list etc). You have to simply return a list of all the objects that are available in your class, (phoneName and phoneImage in our case).

Uses:

Equatable is useful in many cases, one of which is with flutter_bloc

In Bloc, we have to extend Equatable to States and Events classes to use this functionality. This helps us when it comes to stream as we need to decide state updation based on it.

For example,

abstract class FetchUserState extends Equatable {}

FetchUserState will not make duplicate calls and is not going to rebuild the widget if the same state occurs. Now, think if we hadn’t used Equatablehere, then how many times the widget will be rebuilt?

Code File:

import 'package:equatable_example/phone.dart';
import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);

@override
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
final Phone samsung = const Phone(
phoneName: 'Samsung S20 FE 5G',
phoneImage: 'assets/phone1.jpeg',
);
final Phone iphone = const Phone(
phoneName: 'Iphone 11',
phoneImage: 'assets/phone2.jpeg',
);
final Phone iphone2 = const Phone(
phoneName: 'Iphone 11',
phoneImage: 'assets/phone2.jpeg',
);

comparePhone(BuildContext context) {
if (iphone == iphone2) {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(content: Text("YES, They are EQUAL")));
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("NO, They are not EQUAL")));
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.teal,
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Center(child: Text('Equatable Example')),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
phoneWidget(
phoneName: iphone.phoneName, phoneImage: iphone.phoneImage),
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.green),
),
onPressed: () {
comparePhone(context);
},
child: const Text("Compare"),
),
phoneWidget(
phoneImage: iphone2.phoneImage,
phoneName: iphone2.phoneName,
),
],
),
),
);
}

phoneWidget({
required phoneImage,
required phoneName,
}) {
return Column(
children: [
Image.asset(phoneImage),
const SizedBox(height: 5),
Text(
phoneName,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.w800,
),
),
],
);
}
}

Conclusion:

In the article, I have explained the essential construction of the Equatable in a flutter application; you can alter this code as indicated according to your choice. This was a little prologue to the Equatable package on User Interaction from my side, and its functioning utilizing Flutter.

I hope this blog will provide you with sufficient information on Trying up the Equatable package in your flutter projects. We showed you what the Equatable package is? its properties of the Equatable package. We made a demo program for working Equatable package. So please try it.

❤ ❤ 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.


Github Link:

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


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 a 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.

Automation Testing Works On Flutter

0

Automated testing is a process that validates if the software is functioning appropriately and meeting requirements before it is released into production. This software testing method uses scripted sequences that are executed by testing tools.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

What is Automation Testing?

Why Automation Testing?

Automation Testing Life Cycle

The Scope of Automation Testing

The Right Automation Tool

Automation Test Plan, Design, and Strategy

Setting up the Test Environment

Automation Test Script Execution

Analysis and the Generation of Test Results and Test Reports

Types of Automation Testing

Testing Frameworks

Automation Testing Tools

Benefits of Automation Testing

Conclusion


What is Automation Testing?:

Automation Testing is the method of testing software products with special testing tools and frameworks to minimize human intervention and maximize quality.

Automation Testing is finished with the assistance of computerization programming, and it controls the progression of the execution of tests according to the composed test scripts. They are then contrasted with anticipated results to guarantee the quality and dependability of the application. With Automation Testing, one can perform essential monotonous errands and those assignments that are difficult to accomplish with manual testing. Hence, this kind of testing is basic for CI/CD pipelines.

Why Automation Testing?:

At the point when an organization develops an item, having defects is bound. In this way, before the arrival of the item, the organization needs to catch the defects in it to give a consistent client experience. The testing group must perform different sorts of testing, from practical to non-functional, to guarantee the viability, effectiveness, and better client experience of the general item.

However, testers do both Manual and Automation testing, doing Automation Testing facilitates a ton of manual work, gives precise outcomes, and sets aside a ton of time, which results in the faster delivery of the item.

Automation Testing Life Cycle:

To offer the best quality item, an association ought to circle back to the bit by bit Automation Testing life cycle to pull off outcomes on the market. Take a look at the below image that shows the six phases of Automation Testing:

The Scope of Automation Testing:

Before completing the testing system, one should check for the possibility of Automation. Here are what to consider while distinguishing the extent of Testing Automation:

  • What are the modules that can be automated?
  • What are the total effective costs and the team size?
  • What are the tests to be automated, and which is the approach to be taken?

The Right Automation Tool:

Automation Testing is beyond the realm of possibilities without the right testing device. Choosing the right device is a basic stage in the testing life cycle where one needs to think about the accompanying focuses:

  • Familiarity with the tool among the resources on-board
  • Total budget and flexibility
  • Technologies and programming languages used to build the project
  • Choosing a tool that has a support team to take care of any queries and issues

Automation Test Plan, Design, and Strategy:

As the name recommends, in this stage, you make an arrangement, plan the engineering, and formulate a procedure to accomplish the objective of test Automation.

  • Test plan: Creation of test principles and strategies, hardware, programming, and test information prerequisites
  • Test design: Design the test architecture to determine the flow of the test procedures that follow
  • Test strategy: Select a suitable test automation framework

Setting up the Test Environment:

You want to set up a remote machine or a machine where the test cases can be run. It ought to cover a broad test inclusion range for various test situations, various programs, support work areas, and mobile applications.

Automation Test Script Execution:

In this step, you will execute the test scripts and check regardless of whether the contents run accurately. This step includes every one of the utilitarian angles and similarities across numerous stages. You likewise need to create a bug report if the test case fails.

Analysis and the Generation of Test Results and Test Reports:

This is the last phase of the testing life cycle. Here, you will dissect the test reports to decide if they need extra testing or not. Then, the age of test results outcomes is finished to affirm assuming the test contents can recognize mistakes in the application. At long last, the test reports are imparted to the individuals/clients who are involved in the project.

Types of Automation Testing:

At the point when you are given an item, the information on automation types will help you to conclude which sort of test suites you can use for Automating. Automation Testing can be isolated into three classifications as given below:

1) Automation Testing Based on the Types of Testing:

Now, you can check out the types of Automation Testing in the following section.

> Functional Testing

Functional testing is about what the item does and checks each capability/element of the application. It depends on clients’ prerequisites. With useful testing, you approve the activities that you act in the product. It tends to be done Manually as well as automated. An example of functional testing is testing the login functionality of a website.

> Non-functional Testing

Non-functional testing is about how the item acts and checks the non-functional perspectives, like execution, unwavering quality, convenience, and so forth, of the item. It depends on clients’ assumptions. With non-functional testing, you approve the presentation of the product. It is difficult to Manually do. An example of non-functional testing is testing how long it takes for the dashboard in a website to load.

2) Automation Testing Based on the Phases of Testing:

> Unit Testing

A unit refers to the smallest part of the product. For the whole item/programming to function admirably, it is fundamental that every one of the singular pieces of the code fill in as required. Unit testing gives a granular perspective on how the code is performing. It has a quicker execution time since you are trying just lumps of code at a time. As a rule, engineers like to perform unit testing.

> API Testing

API stands for Application Programming Interface. It acts as a middle interface between the UI and the database.

API testing checks the end-to-end functionality of the application. Here, testers will not have access to the source code, and the process does not involve inputs and outputs from the keyboard. Instead, the software is made to send API calls to get the output, and the testers note the system/application response to check the functionality.

> UI Testing

In UI testing, the testers search for the accuracy of the visual components, for example, fields, buttons, names, joins, text fields, and pictures on the framework’s screen. These components should be shown accurately and function as expected for a superior client experience. UI testing additionally checks for the usefulness of the application in dealing with client activities, which are done using their console, mouse, and other information gadgets. Its principal aim is to give a well-disposed UI (UI) and experience.

3) Automation Testing Based on the Types of Tests:

Below is a list of the tests that are common in the field of automation:

> Smoke Testing

Smoke testing is otherwise called build verification testing (BVT). It is finished in the underlying phases of use testing. At the point when you add another component or usefulness to the current form, smoke testing is done that goes about as a designated spot to continue toward a higher degree of testing.

> Integration Testing

Integration testing is also called I&T testing or string testing or rarely thread testing. It is to approve the appropriate correspondence between every one of the modules of the application. All in all, since the product is comprised of a ton of more modest modules, in integration testing, testers legitimately bunch them and test them as gatherings to uncover the defects while keeping up with the communication between these software modules.

> Regression Testing

To be sure if the developed and tested software works the same way after changes have been made, then, at that point, you perform regression testing. The progressions can be bug fixes, arrangement changes, or the improvement of the product. You accomplish this by re-running functional and non-functional tests on the application.

> Security Testing

As a tester, you would rather not cause information breaks, loss of income, and a disaster for notoriety because of unapproved access. To keep away from such episodes and forestall malignant interruption, security testing is finished, which disentangles the basic hazardous strings, weaknesses, dangers, malware, and different dangers in the product application. Security testing assists you with detecting every one of the weaknesses and fragilities in the framework’s security, which you can forestall opportune by thinking of viable arrangements.

> Performance Testing

Regardless of whether your item gets a weighty responsibility, it requirements to work without slack. Thus, you want to test your item before sending off it to the clients to look at its responsiveness, speed, dependability, unwavering quality, and strength under a specific responsibility. An example of performance testing is checking the program reaction time and the server demand handling time.

> Acceptance Testing

Acceptance testing is the last phase of testing before sending off the item into the market. It is finished to ensure all the client needs, business necessities, and the client’s requests are met and to decide whether the item is good for delivery or not.

Testing Frameworks:

Let’s learn about testing frameworks and their types:

A testing framework does only this during the testing system. It has a bunch of rules for the experts that incorporate coding guidelines, store the board, and treatment of test information to come by recipient results, for example, simple code reuse, diminished opportunity to oversee contents, and high movability.

Here are the commonly used testing frameworks:

> Linear Framework

This is the simplest structure of all. Under this framework, you want to compose a basic code to run the experiments with no measured quality of successive advances. It fills in as a record-and-playback model.

> Keyword-driven Framework

It is a scripting technique where you associate keywords with specific activities, for example, opening or shutting of a program, mouse-click events, and others. Later on, in your test scripts, you can call these keywords to perform a particular step. Also, you will have a file where you will maintain all the keywords, alongside the activities they perform.

> Data-driven Framework

In a data-driven framework, all the test case data inputs are put away in the table or extension files, including .xls, .xml, .csv, and so forth. While executing the test scripts, it will peruse the qualities from the table. With the assistance of this structure, you can perform both positive and negative test cases.

> Page Object Model Framework

In the POM framework, you will make an article vault for the web UI components. It permits you to call these strategies later on without composing the code once more. Consequently, it brings about less verbosity, code reusability, and decreased time-utilization to write test scripts.

> Modular Framework

The modular framework permits you to isolate the test scripts into little, free modules. These modules will connect in various leveled ways to run enormous test scripts. This will likewise assist you with making the necessary test situations and testing the contents independently.

Automation Testing Tools:

An automation tool should be chosen based on the type of testing and the type of framework you will execute. There are a ton of devices accessible on the lookout for you to browse according to your necessities.

Some of the most widely used automation tools are listed below.

> Selenium

It is a tool to test web applications and web browsers. It has multiple powerful tools for testing web applications. Also, it supports multiple platforms and browsers.

> Sikuli

Sikuli is an open-source automation testing tool used to perform GUI testing.

> JMeter

It is a tool that is used for performance tests.

> QuickTest Professional (QTP)

Testers use QTP to perform automated regression testing to identify gaps between the actual and desired results and detect the errors/defects that the outcome has.

> JUnit and NUnit

These tools are used by professionals to perform unit testing.

> TestNG

TestNG is more like a framework than a tool, which supports Selenium, REST Assured, Appium, etc. Testers can generate HTML reports for the tests with their status — passed, failed, or skilled. Later on, they can re-execute the failed test cases.

> SoapUI

It is a testing tool used for API testing.

> Appium

It is a tool to perform mobile application testing and native app testing.

Benefits of Automation Testing:

If you are learning Automation Testing, you need to know the benefits of learning it. Like every other type of testing, Automation Testing has its pros and cons.

Here, you will learn about the 10 advantages of Automation Testing:

  • It proves to be reliable since it is carried out by efficient testing tools.
  • 70% faster than manual testing, which saves a lot of time for testers and the organization as a whole.
  • Automation Testing avoids human intervention while executing test scripts.
  • It allows re-usability and re-running of test cases.
  • It increases the speed and efficiency of the software testing process.
  • Automation Testing covers all the application features.
  • It also allows for the faster delivery of the product into the market.
  • Faster feedback systems, which come with Automation Testing, result in an easy communication flow between developers and testers and help detect and fix bugs earlier.
  • It offers improved accuracy as it holds no possibility of human errors.
  • It can run massive amounts of test cases at a time.

Conclusion:

Successful automation mandates a testing process. Just as a developer needs a system development process, testers need a testing process to successfully use test tools. The testing process provides the steps, guidelines, and techniques that will ensure practical, successful automation.

❤ ❤ 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.


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 a 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.


Explore Deep Linking in Flutter

0

Consider you have a web app or website, and two beautiful apps (Android and iOS) for making your product accessible to your customers. Now for some reason, the analytics shows the users are accessing the product information majorly via the browsers not just on the desktop, but also on the mobile.

Very often when a web app/ site is not mobile browser optimized, the user might find it really hard to get the information he/she is seeking which can lead to user drop-offs.

Why not redirect the users to the play store or app store and make them use the apps which are made just to provide an optimized mobile experience?

Oh yes! Why not?

But this can lead to another problem where the user downloads the app, but now he/she has to manually navigate to the products they were once interested in while hitting the URL on the mobile browser. This again breaks user experience which needs to be addressed.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.



URL’s

Assuming the deeplinkingdemoapp.page.link has an Android and an iOS app, the link should redirect you to one of these apps for a better user experience. If the app is already available on your device, there are high chances of you landing on the equivalent app screen if the concept of deep links (which is quite popular already) is implemented inside the apps.

But what happens if the app is not installed?

With Dynamic Links, users get the best available experience for the platform they open the link on. If the link is opened in iOS or Android browsers, it can be taken directly to the linked content in your native app. If a user opens the same link on a desktop browser, they will be taken to the equivalent content on your website or web app.

If a user opens a Dynamic Link on iOS or Android and doesn’t have the app installed, the user can be prompted to install it; then, after installation, your app starts and can access the link shared that was shared.

Dynamic links provide a way for deep links to survive the installation step in a way that the user never loses the context.

How are Dynamic links different from deep links?

A Dynamic Link is a deep link into your app that works whether or not your app is installed. It carries the following information:

  • Project information is available inside the Firebase Console.
  • The package name for the apps that it needs to target.
  • A fallback Url for redirection in those extreme cases where the app could not be installed.
  • And obviously, the deep link that the app should utilize to reach the web equivalent screen.

To add dynamic link support for the apps, we need to add our project in Firebase. This can be done directly from Android Studio:

Tools → Firebase

On the left side, the Firebase Assistant panel click on

Dynamic link → Add Dynamic Links

  • Adding intent filters in AndroidManifest.xml for the activity which will handle the deep links as:
<activity android:name=".MainActivity">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="example.com/link" android:scheme="http"/>
<data android:host="example.com/link" android:scheme="https"/>
<data
android:host="deeplinkingdemoapp.page.link"
android:scheme="https"/>
</intent-filter>
</activity>

> Now upon successful completion of the above steps, we can see our project in the Firebase console.

Firebase Console → Select your project → Dynamic links (Left side panel, under Grow) →Get Started

> Now click on the “New Dynamic link” button on the new page which will open:

  1. Add the deep link URL (URL for which the transition from the web page to the application is needed) as per your requirement. For our example, it will be: https://deeplinkingdemoapp.page.link/GoogleMapScreen

2. Provide app pieces of information to define link behavior for iOS and Android apps. The instructions for linking both Android and iOS apps are pretty much self-explanatory.

3. Click on create.

Now as we see there is another URL visible in the above screenshot :

  1. https://deeplinkingdemoapp.page.link/GoogleMapScreen

This is the dynamic link created which has all the information mentioned above, for it to be able to link (https://deeplinkingdemoapp.page.link/GoogleMapScreen) to our apps whether it is installed or not whenever the user hits the dynamic link on the mobile browsers.

Now the dynamic link has enough information about the app and it can open the app (if installed) or take the user to the play store or app store for app installation. And once the app is launched the deep link which can be retrieved from the dynamic link can be processed.

How to get deep link data from a dynamic link?

_handleDeepLinks() async {
final PendingDynamicLinkData? initialLink =
await FirebaseDynamicLinks.instance.getInitialLink();
if (initialLink != null) {
final Uri deepLink = initialLink.link;
print('Deeplinks uri:${deepLink.path}');
if (deepLink.path == '/ShowApiDataScreen') {
AppRoute.nextPage(
context,
ShowApiDataScreen(
deepLinkPath: '${deepLink.path}:Deep Link',
));
} else if (deepLink.path == '/GoogleMapScreen') {
AppRoute.nextPage(
context,
GoogleMapScreen(
deepLinkPath: '${deepLink.path}:Deep Link',
));
} else if (deepLink.path == '/UserSignUpScreen') {
AppRoute.nextPage(
context,
UserSignUpScreen(
deeplinkPath: '${deepLink.path}:Deep Link',
));
}
}
}

pendingDynamicLinkData will be https://deeplinkingdemoapp.page.link/GoogleMapScreen and pendingDynamicLinkData.getLink() returns the deep link (which will be https://deeplinkingdemoapp.page.link/GoogleMapScreen in our case) associated with the dynamic link received by the activity. Now, this deep link can be handled similarly to any other deep links that the app supports.

I hope this post will give you a basic idea of creating Firebase Dynamic Links and setting Firebase Dynamic Links SDK on Android.

❤ ❤ 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.


GitHub Link:

find the source code of Deep Linking in Flutter With Firebase Dynamic Links:

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


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 a flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! For any flutter-related queries, you can connect with us on Facebook, GitHub, Twitter, and LinkedIn.

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.

Animating a Widget Across Screens In Flutter

0

Before figuring out how to animate widgets, we want to grasp the fundamentals of animations.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


What are animations?

Animations are a fundamental and coordinated piece of any Flutter mobile application development organization like Aeologic Technologies, which adds to the regular and smooth working of the UI. The intelligent highlights and quick changes make it easy to understand and upgrade the client experience Flutter upholds different animation features for its consumers.

In this manner, it is significant to comprehend the basics of widget animations to convey an advanced client experience. Flutter SDK offers a few underlying animations for widgets.

The underlying animations presented by Flutter are Fade transition, Size transition, and slide transition. These widgets work by setting a beginning and end point. On the off chance that your picture doesn’t match the current devices, you can utilize the custom option.

  1. Fade Transition
    By changing the haziness of a widget, you might blur it in and out with Fade Transition. You should set opacity values in the Animation Controller at the underlying stage. One should give an opacity border with animation and a child widget in the animation code.

2. Size Transition
The size transition permits one to change the widget’s height, width, and alignment. It enlivens its child and clips through alignment.

3. Slide Transition
The slide transition permits you to change the ordinary place of the widget. It moves from right to left or left to right assuming one gives text direction.

Kinds of custom animation in Flutter:

There are by and large two methods for animating the widgets in Flutter, either tweens-based or physics-based.

  • > Tweens-based animation:
    Tween animation is the short name given “in-between”, and it produces pictures between two given keyframes. Keyframes are characterized as the pictures given at the initial and last mark of an animation — for example, the change of an animated creature hopping starting with one tree and then onto the next.

The tween animation gives in-between upsides of two alignments, positions, or tones. It naturally captures the progress going through a chain of middle-of-the-road values and adds the accuracy of characterizing the time and speed features.

  • > Physics-based animation:
    Physics-based animation gives a practical vibe to the spirits. The intelligent highlights of the application connect you to regular-world concepts and ideas.

You can animate the items by adding a spring, fall, glide, or swing characterizing the ideas of gravity. The animation deals with the contribution of movement entered by the client. The time, speed, and distance are determined by complying with the standard rules of physics.

How to animate a widget across screens in Flutter?

The animation, which shows a visual association when the client changes the components from one screen then onto the next, can be performed by animation in Flutter. This change is finished by utilizing a hero sort of movement.

Hero class – widgets library – Dart API
A widget that marks its child as being a candidate for hero animations. When a PageRoute is pushed or popped with the…api. flutter.dev


Table Of Contents::

Hero Animations

Constructor

Properties

Code Implement

Code File

Conclusion

GitHub Link


Hero animations:

Hero routes are the least demanding to code in Flutter as it doesn’t need a lot of arrangement. The animation that shows smooth progress starting from one screen and then onto the next is Hero animation.

For instance, when you select a thing through a progression of thumbnails introduced in a sale, it takes you to another screen with a purchase option, and you can likewise fly back to the past screen. This sort of animation code is otherwise called a shared element transition.

The hero animation provides two types of animation codes:

  • Standard hero animation
  • Radial hero animation
  • > Standard hero animation: In standard animation code, the widget makes a trip starting with one space and then onto the next, finishing with a different shape and size than the first.
  • > Radial hero animation: Radial animation code has a shape change from circular to rectangular with progress starting with one screen and then onto the next.

Structure of Hero code animation: Two hero widgets are expected to carry out hero animation. The principal widget depicts the source course, and the subsequent one addresses the destination course.

Demo Module :

Constructor:

To utilize hero widget, you need to call the constructor underneath:

const Hero({
Key? key,
required this.tag,
this.createRectTween,
this.flightShuttleBuilder,
this.placeholderBuilder,
this.transitionOnUserGestures = false,
required this.child,
})

In Above Constructor all fields marked with @required must not be empty.

Properties:

There are some properties of Hero Widget:

  • child Widget: The widget subtree that will “fly” from one route to another during a Navigator push or pop transition.
  • createRectTween CreateRectTween: Defines how the destination hero’s bounds change as it flies from the starting route to the destination route.
  • flightShuttleBuilder HeroFlightShuttleBuilder: Optional override to supply a widget that’s shown during the hero’s flight.
  • placeholderBuilder HeroPlaceholderBuilder: Placeholder widget left in place as the Hero’s child once the flight takes off.
  • tag Object: The identifier for this particular hero. If the tag of this hero matches the tag of a hero on a PageRoute that we’re navigating to or from, then a hero animation will be triggered.
  • transitionOnUserGestures bool: Whether to perform the hero transition if the PageRoute transition was triggered by a user gesture, such as a back swipe on iOS.

How to implement code in dart file:

You need to implement it in your code respectively:

Create a new dart file called main.dart inside the lib folder.

We will create a stateless widget “FirstScreen” in which we will implement the Hero widget.

class FirstScreen extends StatelessWidget {
const FirstScreen({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text('First Screen'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Hero(
tag: "HeroOne",
child: Image.asset('assets/phone1.jpeg')
),
ElevatedButton(
child: const Text('Go to second screen'),
onPressed: () {
Navigator.push(context, CustomPageRoute(const SecondScreen()));
},
),
],
),
),
);
}
}

then we do the same for the second screen, and implement the Hero widget on that screen as well,

class SecondScreen extends StatelessWidget {
const SecondScreen({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text("Second Screen"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Hero(
tag: "HeroOne",
child: Image.asset('assets/phone2.jpeg')
),
ElevatedButton(
child: const Text('Back to first screen!'),
onPressed: () {
Navigator.pop(context);
},
),
],
)),
);
}
}

When we run the application, we ought to get the screen’s output like the underneath screen capture.

and lastly, for the page route animation, we will implement this code,

class CustomPageRoute<t> extends PageRoute<t> {
final Widget child;
CustomPageRoute(this.child);

@override
Color get barrierColor => Colors.black;

@override
String get barrierLabel => '';

@override
bool get maintainState => true;

@override
Duration get transitionDuration => const Duration(seconds: 2);

@override
Widget buildPage(
BuildContext context,
Animation<double> animation,
Animation secondaryAnimation,
) {
return FadeTransition(
opacity: animation,
child: child,
);
}
}

Code File:

import 'package:example_hero_widget_app/splash_screen.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
routes: {
'/first': (context) => const FirstScreen(),
'/second': (context) => const SecondScreen(),
},
home: const Scaffold(
body: Splash(),
),
);
}
}

class FirstScreen extends StatelessWidget {
const FirstScreen({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text('First Screen'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Hero(
tag: "HeroOne",
child: Image.asset('assets/phone1.jpeg')
),
ElevatedButton(
child: const Text('Go to second screen'),
onPressed: () {
Navigator.push(context, CustomPageRoute(const SecondScreen()));
},
),
],
),
),
);
}
}

class SecondScreen extends StatelessWidget {
const SecondScreen({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text("Second Screen"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Hero(
tag: "HeroOne",
child: Image.asset('assets/phone2.jpeg')
),
ElevatedButton(
child: const Text('Back to first screen!'),
onPressed: () {
Navigator.pop(context);
},
),
],
)),
);
}
}

class CustomPageRoute<t> extends PageRoute<t> {
final Widget child;

CustomPageRoute(this.child);

@override
Color get barrierColor => Colors.black;

@override
String get barrierLabel => '';

@override
bool get maintainState => true;

@override
Duration get transitionDuration => const Duration(seconds: 2);

@override
Widget buildPage(
BuildContext context,
Animation<double> animation,
Animation secondaryAnimation,
) {
return FadeTransition(
opacity: animation,
child: child,
);
}
}

Conclusion:

In the article, I have explained the essential construction of the Hero widget in a flutter; you can alter this code as per your choice. This was a little introduction to the Hero widget on User Interaction from my side, and it’s working using Flutter.

I hope this blog will provide you with sufficient information on Trying up the Hero widget in your flutter projects. We showed you what the Hero widget is, its constructor, and its properties of the Hero widget. We made a demo program for the working Hero widget. So please try it.

❤ ❤ 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.


GitHub Link:

find the source code of the hero_widget:

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


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 a 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.

Selenium WebDriver Architecture in Testing

0

Hi everyone! today we explore Selenium WebDriver Architecture In Testing. In the modern world, with each passing day, hundreds of web and mobile applications are being deployed to the web. QA team has to always be on their toes to ensure that these web applications are functional outside the development environment by ensuring the functionality is adequately tested before release to the customer.

Prior, this drawn-out task was finished by the manual testers through the human force of perception, taking a gigantic measure of time. Selenium entered the business. Selenium is a set-up of devices viz. Selenium IDE, WebDriver, Selenium RC, and so forth assist the QA with joining to mimic client activities on the internet browser and mechanizes the client stream, consequently helping in executing a huge no of experiments in a limited capacity to focus time.

Selenium Webdriver is one of the basic individuals from this family and is notable for its variety and security for web automation. Selenium Webdriver has sort of turned into a true for UI automation and over 80% of the organizations are utilizing it. Let’s understand the details of this tool by covering the following sections:

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


What is Selenium?

Selenium is a free (open source) automated testing framework used to validate web applications across different browsers and platforms. You can use multiple programming languages like Java, C#, Python, etc to create Selenium Test Scripts. Testing done using the Selenium testing tool is usually referred to as Selenium Testing.

Selenium Software is not just a single tool but a suite of software, each piece catering to different Selenium QA testing needs of an organization. Here is the list of tools

  • Selenium Integrated Development Environment (IDE)
  • Selenium Remote Control (RC)
  • WebDriver
  • Selenium Grid

At the moment, Selenium RC and WebDriver are merged into a single framework to form Selenium 2.

What is Selenium WebDriver?

Selenium WebDriver is a bunch of open-source APIs, which furnished the capacities to collaborate with any of the cutting-edge internet browsers and afterward, thus, computerize the client activities with that program.

It is a fundamental part of the Selenium family. As we probably are aware, Selenium is not a free device; rather, an assortment of instruments make the Selenium suite, which was made when two undertakings Selenium RC and WebDriver were blended.

Why use Selenium WebDriver for Web Automation?

Now that we know what Selenium WebDriver is and what it does let’s take a look at why it is the optimum choice to use for web automation.

  • DescriptionDynamic Web Page Automation: Selenium WebDriver can mechanize dynamic sites where the substance of pages changes by client activities.
  • Works Close to Browser: Program merchants transport their WebDriver execution. Subsequently, they are firmly coupled to the program giving a superior testing experience.
  • Technology Agnostic: Selenium WebDriver permits you to mechanize the experiments for all the web applications, regardless of the innovation utilized for the improvement of the application under test.
  • Mimics Real User: Selenium WebDriver permits QA to impersonate client activities on the sites. Selenium WebDriver can imitate ordinary client activities like structure filling, clicking, double tapping, and key-press, as well as cutting edge client activities like simplified, snap and hold, and so on.
  • Supports Cross Browser Testing: Selenium WebDriver enjoys the main benefit while doing cross-program testing — where a QA can test for a similar site, utilizing a similar piece of code on various programs. It empowers the confirmation and approval of experiments on numerous arrangements of programs simultaneously.
  • Supports parallel Execution: On the off chance that there are more scripts to be executed on numerous programs, doing them individually is tedious. So Selenium WebDriver permits equal execution, utilizing structures like TestNG, so the execution of experiments is quicker. This permits huge scope execution of experiments in a brief time frame.
  • View Execution Results: Selenium WebDriver permits a QA to see the live execution of the mechanized trial on the PC framework as well as on some other CI/CD pipeline machine by supporting functionalities like the screen capture, video-recording of test cases, and so on.
  • Supports modern development techniques: Selenium WebDriver coordinates very well with present-day Software Development standards like Behavior Driven Development through reconciliation with the Cucumber library.

In general, Selenium WebDriver is one of the main pieces of the Selenium suites, which upholds practically every one of the highlights required for the automation of a web application.

Why Selenium WebDriver is popular?

Apart from the above-mentioned capabilities, WebDriver, being part of the Selenium family, also encompassed some unique characteristics, which adds to its popularity as a web automation tool. A few of those characteristics are:

  • Multi-Browser Compatibility —One of the excellent explanations behind the prevalence of Selenium and WebDriver is its cross-program support utilizing a similar piece of code. It provides the capacity to run a particular piece of code that imitates a certifiable client utilizing a program’s local help to hit direct API calls without the requirement for any middleware software or device. The below shows a sample list of browsers supported:
  • Multi-Language Support — Not all testers are knowledgeable about a specific language. Since Selenium offers help for some dialects so a tester can utilize any language out of the upheld dialects and afterward use WebDriver for automation. This allows composing code in the language individuals is alright with.
  • Faster Execution —Unlike Selenium RC, WebDriver doesn’t rely upon a middleware server to communicate with the browser. WebDriver coordinates correspondences with browsers utilizing a characterized convention (JSON Wire), which empowers it to convey quicker than most Selenium devices. Additionally, since JSON Wire itself utilizes JSON, which is exceptionally lightweight, how much information move per call is extremely least. The below figure shows clearly how the WebDriver communicates with the Browser:
  • Locating Web Elements —To perform activities like Click, Type, Drag, and Drop we first need to distinguish on which web component (like button, checkbox, drop-down, text region) we want to play out an activity. To work with this, WebDriver has given techniques to distinguish web components utilizing different HTML credits — like id, name, class, CSS, label name, XPath, interface text, and so on.
  • Handling dynamic web elements — There are times when there are web components on the page that, change with each reload of the page. Since the HTML credits transform, it turns into a test to recognize these components. Selenium gives different strategies to deal with these circumstances
  • Absolute Xpath — this contains the complete XML path of the element in question.
  • Contains( ) — using these functional elements can be searched with partial or full text and can be used to handle dynamic elements.
  • Starts-With( ) — this function is based on finding elements using starting text of the attribute under question.
  • Handling Waiting for Elements — Not every one of the pages has a similar construction. Some are lightweight, while some have a lot of information taking care of or AJAX calls. Commonly the web components get some margin to stack. To represent this WebDriver has given various holding up components that can be utilized to stop the content execution for a necessary measure of time given specific circumstances and afterward proceed with once the condition is full-filled. The accompanying figure shows an example list that shows the capacities of WebDriver which helps in dealing with the unique way of behaving of web pages.

What are the drawbacks of Selenium WebDriver?

Although Selenium works a long way out in solving the *UI *and functional automation of web applications, it is not without its drawbacks. Let’s look at some of the shortcomings/drawbacks:

  • Requires Programming Knowledge and Expertise —Since WebDriver permits you to computerize the client activities utilizing code written in a specific programming language, any individual who needs to utilize it ought to have an essential comprehension of how coding in the language functions. Individuals who don’t have a comprehension of coding in a programming language will find it hard to utilize WebDriver.
  • No Support for Desktop Applications — Selenium environment, including WebDriver, was worked for the automation of web applications. In that capacity assuming you are hoping to Automate windows based applications, you can not do such.
  • No Customer Support — The selenium ecosystem, including WebDriver is open-source, and that implies it is driven by people and not by any organization. Along these lines, there is not a committed help group to investigate your issues. On the off chance that an individual has stuck someplace, there are numerous networks, and discussions on which an individual can depend, however, there’s nothing else to it.
  • No Built-In Object Repository — Paid tools like UFT/QTP give a concentrated area to store objects/components, called the Object Repository. This capacity isn’t given as a matter of course in Selenium WebDriver. This can be defeated utilizing approaches like the Page Object Model, yet it requires impressive coding abilities and aptitude.
  • Lack of built-in reporting —Selenium WebDriver can assist you with running your automation tests yet to give a detailing capacity, you would have to coordinate it with a testing framework like Junit, TestNG, PyTest, Allure, and so on.
  • Managing Browser-Selenium Dependencies —Since Selenium needs to depend on similarity between the program drivers and the genuine program itself, commonly because of contradiction or bugs in either the program driver or program, usefulness breaks, and clients need to depend on local area backing to sort it out.

Understanding of Selenium WebDriver Architecture:

Being a piece of the general part framework, we find that the Selenium WebDriver isn’t a standalone testing tool. It involves different parts that are expected to run tests. These are the architectural components of Selenium.

So first let’s take a look at this image below

This image tells us about the core selenium web driver architecture and the major selenium components which comprise WebDriver.

  • Selenium WebDriver Client Libraries / Language Bindings — Software Testers need to select languages that they are comfortable with. Since WebDriver Architecture upholds various dialects, so there are ties accessible for a scope of dialects like Java, C#, Python, Ruby, PHP, and so on. Any individual who has fundamental information on working with any programming language can get explicit language ties and can get going. This is the way Selenium Architecture gives adaptability to testers to do automation in their usual range of familiarity.
  • JSON WIRE PROTOCOL — According to the Selenium Architecture over, the JSON Wire Protocol works with all the correspondence that is occurring in Selenium between the program and the code. This is the core of Selenium. JSON Wire Protocol gives a medium to information move utilizing a RESTful (Representational State Transfer) API which gives a vehicle system and characterizes a RESTful web service using JSON over HTTP.
  • Browser Drivers — Since different programs are upheld by Selenium, every program has its execution of the W3C standard that Selenium gives. As such program explicit doubles are accessible that are intended for the program and conceal the execution rationale from the end client. JSONWire convention lays out an association between the program pairs and the client libraries.
  • Browsers —Selenium will be simply ready to run tests on the browser if they are privately introduced, either on the local machine or on the server machines. So browser installation is essential.

How does Selenium WebDriver work?

In the section above, we saw the architecture of Selenium. Now let’s see how behind the scenes all the communication happens.

Take a look at the image below — this shows a view of what the actual workflow looks like.

When a user writes a WebDriver code in Selenium and executes it, the following actions happen in the background:

  • An HTTP request generates, and it goes to the respective browser driver (Chrome, IE, Firefox). There is an individual request for each Selenium command.
  • The browser driver receives the request through an HTTP server.
  • The HTTP server decides which actions/instructions need to execute on the browser.
  • The browser executes the instructions/steps as decided above.
  • The HTTP server then receives the execution status and then sends back the status to an automation script, which then shows the result ( as passed or an exception or error).

How to use Selenium WebDriver for Web Automation?

Selenium WebDriver provides a very seamless, user-friendly, and code-friendly approach to automation using various browsers. Since it supports most of the major browser vendors, it’s just a matter of using the respective browser driver and browser and setting up Selenium to use the same.

For any Selenium test script, there are generally the following 7 steps, which apply to all the test cases and all the applications under test (AUT):

  1. Create an instance of WebDriver specific to the Browser:
  • Eg: To create an instance of the Firefox driver, we can use the following commands:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
WebDriver driver = new FirefoxDriver();

2. Navigate to the desired Web page which needs to be automated:

driver.get("https://www.google.com/")

3. Locate an HTML element on the Web page:

  • To interact with a web page, we need to locate the HTML elements on the web page. We can use any of the element locator strategies mentioned in “Selenium Locators”. Eg: if we want to get the “Full Name” text box, we can use the following commands:
import org.openqa.selenium.By; 
import org.openqa.selenium.WebElement;
WebElement usernameElement = driver.findElement(By.id("userName"));

4. Act on an HTML element:

We can perform certain actions on the HTML elements, such as typing something using the SendKeys method, and clicking on the element if it is a button. Eg: if we want to type the name in the identified text box, we can use the following commands:

usernameElement.sendKeys("Pragati Oli");

5. Run tests and record test results using a test framework.

And, we are done with using the WebDriver to identify and perform the needed actions on the Web Application. Depending on the browser, on which we need to test our application, we can use the corresponding WebDriver.

Here is a list of various browsers and their respective browser drivers:

Recently Microsoft moved their Edge browser to the same platform as Chromium (which is the parent for Chrome), and due to this ChromeDriver can now also support Microsoft Edge Chromium.

Conclusion:

Selenium is a cost-effective and flexible tool developer can use in the automation testing of their web applications. The most intriguing feature of this software is the capacity to test applications across different internet browsers. This guarantees that sites don’t crash or breakdown down specific programs.

The Selenium software is great for organizations creating applications that help heavy traffic, particularly friendly stages and internet business sites. This software has gone through progress throughout the long term, which has increased the value of web development.

❤ ❤ 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.


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 a 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.


Explore Freezed In Flutter

0

Hello Everyone.! In this article, we learn about Freezed in Flutter Application. And how it works in Flutter Applications. With the help of freezed, we can reduce the lines of code.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents:

Introduction

How to Use

Implementation

Conclusion



Introduction:

Freezed is a code-generation package that helps you to create data classes in Dart. It stops you from writing a ton of error-prone lines. Sometimes you just want a class that obtains its values in a constructor, a toString method, and maybe value impartiality. That lone is a lot. But now visualize you want objects to remain fixed. For that, you need an extra copyWith method. If you know how to implement all this in Dart, you surely know that it takes many lines of code to achieve this.


How to Use Freezed:

  • Project Setup:- For using freezed first you need to create a project. Open Android Studio, create a new Flutter Project, and add the project’s name, project location, description, and also domain. For any project, we have to choose the platform, on which we want to run our project. After that, we have to add some dependencies which are necessary to use
  • Install:- First we have to add some dependencies in our project by which we can easily use Freezed. Build_Runner, Freezed, Freezed_Annotation.
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.1.7
freezed: ^1.1.1
freezed_annotation: ^1.1.0

or we can add these dependencies by using commands.

flutter pub add freezed_annotation
flutter pub add --dev build_runner
flutter pub add --dev freezed

> freezed:- Freezed package is used to create the model. It’s code generator for data-classes/unions/pattern-matching/cloning.

> build_runner:- The build_runner package provides a concrete way of generating files using Dart code, outside of tools like the pub. Unlike pub serve/build, files are always generated directly on disk, and rebuilds are incremental – inspired by tools such as Bazel.

> freezed_annotation:- Freezed_annotations for freezed. This package does nothing without freezed. If we want to use Freezed so we have to use this package without this we can’t use Freezed.

  • Run the generator:- To run the code generator, execute the following command.
flutter pub run build_runner build

> When the packages providing Builder are configured with a build. ymal file they are designed to be consumed using a generated build script. Most builders should need little or no configuration, see the documentation provided with the Builder to decide whether the build needs to be customized. If it does you may also provide a build. ymal with the configuration.

and also add import the packages in dart file.

import 'package:freezed/builder.dart';
  • Creating a Model using Freezed:- First, you have to create a class that has the @freezed annotation. We create a class with the name of TestModel{}.
import 'package:freezed_annotation/freezed_annotation.dart';part 'response.freezed.dart';
part 'response.g.dart';@freezed
class TestModel{}

After creating the class we define the class with mixins. A mixin is a class whose methods and properties can be used by other classes without sub-classing.

import 'package:freezed_annotation/freezed_annotation.dart';part 'response.freezed.dart';
part 'response.g.dart';@freezed
class TestModel with _$TestModel{}

Now we add a factory method as a constructor with a list of all the arguments/properties. Here we have defined @Default inside the factory method which comes from ‘freezed_annotation’.The @Default annotation is used to set a default value for non-required properties.

import 'package:freezed_annotation/freezed_annotation.dart';part 'response.freezed.dart';
part 'response.g.dart';@freezed
class TestModel with _$TestModel {
@JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)
const factory TestModel({
@JsonKey(name: 'id') int? id,
@JsonKey(name: 'label') String? label,
@JsonKey(name: 'image') String? image,
@JsonKey(name: 'status') int? status,

}) = _TestModel;

And at last, we have now created our constructor, In which we have to implement fromJson/toJson. In the freezed package, fromJson and toJson are not generated, but it knows what json_serializable is.

import 'package:freezed_annotation/freezed_annotation.dart';

part 'response.freezed.dart';
part 'response.g.dart';@freezed
class TestModel with _$TestModel {
@JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)
const factory TestModel({
@JsonKey(name: 'id') int? id,
@JsonKey(name: 'label') String? label,
@JsonKey(name: 'image') String? image,
@JsonKey(name: 'status') int? status,

}) = _TestModel;

factory TestModel.fromJson(Map<String, dynamic> json) =>
_$TestModelFromJson(json);
}

For creating a response.freezed.dart and response.g.dart we have to run the command if we don’t run this command so our code will show errors. The next step is to navigate within the terminal to the folder where our project is located and execute the following command.

flutter pub run build_runner build --delete-conflicting-outputs

Conclusion:

In this article, we have been through how to use Freezed in Flutter. In this, you can see how it is to use, how much code will be saved, and also the time we can save by using freezed By using we can perform many operations and create a Flutter application.

❤ ❤ 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.


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 a flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! For any flutter-related queries, you can connect with us on Facebook, GitHub, Twitter, and LinkedIn.

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.


Implement Bottom Navy Bar In Flutter

Whenever you will code for building anything in Flutter, it will be inside a widget. The focal design is to construct the application out of widgets. It depicts how your application view should look with its ongoing design and state. Right when you make any changes in the code, the widget adjusts its portrayal by working out the separation between the past and current widget to pick the unimportant changes for conveying in the UI of the application.

In Flutter, to assemble any application, we start with widgets. The building block of flutter applications. Widgets depict what their view ought to resemble given their ongoing setup and state. It consists of a text widget, line widget, segment widget, container widget, and some more.

In this article, we will explore the Bottom Navy Bar In Flutter. We will implement the Bottom Navy Bar demo program and learn how to use the same in your flutter applications.

bottom_navy_bar | Flutter Package
A beautiful and animated bottom navigation. The navigation bar uses your current theme, but you are free to customize…pub.dev

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

Bottom Navy Bar

Properties

Code Implement

Code File

Conclusion

GitHub Link


Bottom Navy Bar:

Bottom Navy Bar in Flutter is a lovely and animated bottom navigation Widget. The navigation bar utilizes our ongoing theme, yet we are allowed to customize it.

We have the BottomNavyBar widget, which we can use in the Scaffold to give the bottom navigation bar. Alongside it, we additionally have BottomNavyBarItem, which we can use inside the BottomNavyBar widget to give the items.

Demo Module :

Properties:

There are some properties of Bottom Navy Bar and Bottom Navy Bar Item:

> BottomNavyBar

  • iconSize – the item icon’s size
  • items – navigation items, required more than one item and less than six
  • selectedIndex – the current item index. Use this to change the selected item. Default to zero
  • onItemSelected – required to listen when an item is tapped it provides the selected item’s index
  • backgroundColor – the navigation bar’s background color
  • showElevation – if false the app bar’s elevation will be removed
  • mainAxisAlignment – use this property to change the horizontal alignment of the items. It is mostly used when you have only two items and you want to center the items
  • curve – param to customize the item change’s animation
  • containerHeight – changes the Navigation Bar’s height

> BottomNavyBarItem

  • icon – the icon of this item
  • title – the text that will appear next to the icon when this item is selected
  • activeColor – the active item’s background and text color
  • inactiveColor – the inactive item’s icon color
  • textAlign – property to change the alignment of the item title

How to implement code in dart file:

You need to implement it in your code respectively:

Create a new dart file called main.dart inside the lib folder.

First, we implement PageView with a controller and multiple children in our scaffold.

PageView(
controller: _pageController,
children: <Widget>[
Container(
color: Colors.red,
child: Center(
child: Image.asset(
'assets/1.jpeg',
),
),
),
Container(
color: Colors.green,
child: Center(
child: Image.asset(
'assets/2.jpeg',
),
),
),
Container(
color: Colors.yellow,
child: Center(
child: Image.asset(
'assets/3.jpeg',
),
),
),
Container(
color: Colors.blue,
child: Center(
child: Image.asset(
'assets/4.jpeg',
),
),
),
],
),

then we implement the bottom navy bar as the bottom navigation bar in our scaffold,

BottomNavyBar(
containerHeight: 55.0,
backgroundColor: Colors.white70,
selectedIndex: _currentIndex,
showElevation: false,
itemCornerRadius: 24,
curve: Curves.easeIn,
onItemSelected: (index) => setState(() {
_currentIndex = index;
_pageController.animateToPage(index,
duration: const Duration(milliseconds: 100),
curve: Curves.easeIn);
}),

When we run the application, we ought to get the screen’s output like the underneath screen capture.

and then we items for the bottom navy bar with different icons and different properties,

items: <BottomNavyBarItem>[
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.apps),
title: const Text('Home'),
activeColor: Colors.red,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.search_outlined),
title: const Text('Search'),
activeColor: Colors.green,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.settings),
title: const Text(
'Settings ',
),
activeColor: Colors.yellow,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.account_box),
title: const Text('Account'),
activeColor: Colors.blue,
textAlign: TextAlign.center,
),
],

When we run the application, we ought to get the screen’s output like the underneath screen capture.


Code File:

import 'package:example_bottom_navy_bar/splash_screen.dart';
import 'package:flutter/material.dart';
import 'package:bottom_navy_bar/bottom_navy_bar.dart';void main() {
runApp(const MyApp());
}class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key); @override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const Splash(),
);
}
}class MyBottomNavyBar extends StatefulWidget {
const MyBottomNavyBar({Key? key}) : super(key: key); @override
BottomNavyBarState createState() => BottomNavyBarState();
}class BottomNavyBarState extends State<MyBottomNavyBar> {
PageController _pageController = PageController();
int _currentIndex = 0; @override
void initState() {
super.initState();
_pageController = PageController();
} @override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Center(
child: Text("Bottom Navy Bar"),
),
),
body: PageView(
controller: _pageController,
children: <Widget>[
Container(
color: Colors.red,
child: Center(
child: Image.asset(
'assets/1.jpeg',
),
),
),
Container(
color: Colors.green,
child: Center(
child: Image.asset(
'assets/2.jpeg',
),
),
),
Container(
color: Colors.yellow,
child: Center(
child: Image.asset(
'assets/3.jpeg',
),
),
),
Container(
color: Colors.blue,
child: Center(
child: Image.asset(
'assets/4.jpeg',
),
),
),
],
),
bottomNavigationBar: BottomNavyBar(
containerHeight: 55.0,
backgroundColor: Colors.white70,
selectedIndex: _currentIndex,
showElevation: false,
itemCornerRadius: 24,
curve: Curves.easeIn,
onItemSelected: (index) => setState(() {
_currentIndex = index;
_pageController.animateToPage(index,
duration: const Duration(milliseconds: 100),
curve: Curves.easeIn);
}),
items: <BottomNavyBarItem>[
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.apps),
title: const Text('Home'),
activeColor: Colors.red,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.search_outlined),
title: const Text('Search'),
activeColor: Colors.green,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.settings),
title: const Text(
'Settings ',
),
activeColor: Colors.yellow,
textAlign: TextAlign.center,
),
BottomNavyBarItem(
inactiveColor: Colors.black,
icon: const Icon(Icons.account_box),
title: const Text('Account'),
activeColor: Colors.blue,
textAlign: TextAlign.center,
),
],
),
);
} @override
void dispose() {
_pageController.dispose();
super.dispose();
}
}

Conclusion:

In the article, I have explained the actual construction of the Bottom Navy Bar widget in a flutter; you can alter this code as per your choice. This was a little introduction to the Bottom Navy Bar widget on User Interaction from my side, and it’s working using Flutter.

I hope this blog will provide sufficient information on Trying up the Bottom Navy Bar widget in your flutter projects. We showed you what the Bottom Navy Bar widget is, and the properties of the Bottom Navy Bar widget. We made a demo program for working Bottom Navy Bar widget. So please try it.

❤ ❤ 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.


GitHub Link:

find the source code of the bottom_navy_bar:

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


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 a 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.

Difference Between Manual and Automation Testing In Flutter

0

There are a few significant contrasts between manual testing and Automation testing. In manual testing, a human plays out the tests bit by bit, without test scripts. In Automated testing, tests are executed consequently by means of test automation structures, alongside different devices and programming.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

What is Manual Testing?

What is Automation Testing?

Manual Testing vs Automation Testing

Manual Testing Pros and Cons

Automated Testing Pros and Cons

Conclusion


What is Manual Testing?

Manual testing is testing of the software where tests are executed manually by a QA Analyst. It is performed to discover bugs in software under development.

In Manual testing, the tester checks all the essential features of the given application or software. In this process, the software testers execute the test cases and generate the test reports without the help of any automation software testing tools.

It is a classical method for all testing types and helps find bugs in software systems. It is generally conducted by an experienced tester to accomplish the software testing process.

What is Automation Testing?

In Automated Software Testing, testers write code/test scripts to automate test execution. Testers use appropriate automation tools to develop the test scripts and validate the software. The goal is to complete test execution in less amount of time.

Automated testing entirely relies on the pre-scripted test which runs automatically to compare actual results with the expected results. This helps the tester to determine whether or not an application performs as expected.

Automated testing allows you to execute repetitive tasks and regression tests without the intervention of a manual tester. Even though all processes are performed automatically, automation requires some manual effort to create initial testing scripts.

Manual Testing vs Automation Testing:

There are some differences between Manual Testing and Automation Testing are:

> Automation Testing:

  • Automation Testing uses automation tools to execute test cases.
  • Automated testing is significantly faster than a manual approach.
  • Automation does not allow random testing.
  • The initial investment in automated testing is higher. Though the ROI is better in the long run.
  • Automated testing is a reliable method, as it is performed by tools and scripts. There is no testing for Fatigue.
  • For even a trivial change in the UI of the AUT, Automated Test Scripts need to be modified to work as expected.
  • Investment is required for testing tools as well as automation engineers.
  • Not cost-effective for low-volume regression.
  • With automation testing, all stakeholders can log in to the automation system and check test execution results.
  • Automated testing does not involve human consideration. So it can never give assurance of user-friendliness and positive customer experience.
  • You can Batch multiple Test Scripts for nightly execution.
  • Programming knowledge is a must in automation testing.
  • Automation test requires a less complex test execution setup.
  • Automated Tests help in Build Verification Testing and are an integral part of the DevOps Cycle.
  • Automated Testing is suited for Regression Testing, Performance Testing, Load Testing, or highly repeatable functional test cases.

> Manual Testing:

  • In manual testing, test cases are executed by a human tester and software.
  • Manual testing is time-consuming and takes up human resources.
  • Exploratory testing is possible in Manual Testing.
  • The initial investment in Manual testing is comparatively lower. ROI is lower compared to Automation testing in the long run.
  • Manual testing is not as accurate because of the possibility of human errors.
  • Small changes like changes in id, class, etc. of a button wouldn’t thwart the execution of a manual tester.
  • Investment is needed for human resources.
  • Not cost-effective for high-volume regression.
  • Performance Testing is not feasible manually
  • Executing the Build Verification Testing (BVT) is very difficult and time-consuming in manual testing.
  • Manual Testing does not use frameworks but may use guidelines, checklists, and stringent processes to draft certain test cases.
  • Manual Unit Tests do not drive design into the coding process.
  • Manual Unit Tests do not drive design into the coding process.
  • Manual Testing is suitable for Exploratory, Usability, and Adhoc Testing. It should also be used where the AUT changes frequently.

Manual Testing Pros and Cons:

> Pros of Manual Testing:

  • Get fast and accurate visual feedback
  • It is less expensive as you don’t need to spend your budget on the automation tools and process
  • Human judgment and intuition always benefit the manual element
  • While testing a small change, an automation test would require coding which could be time-consuming. While you could test manually on the fly.

> Cons of Manual Testing:

  • Less reliable testing method because it’s conducted by a human. Therefore, it is always prone to mistakes & errors.
  • The manual testing process can’t be recorded, so it is not possible to reuse the manual test.
  • In this testing method, certain tasks are difficult to perform manually which may require additional time in the software testing phase.

Automated Testing Pros and Cons:

> Pros of automated testing:

  • Automated testing helps you to find more bugs compare to a human tester
  • As most of the part of the testing process is automated, you can have a speedy and efficient process
  • The automation process can be recorded. This allows you to reuse and execute the same kind of testing operations
  • Automated testing is conducted using software tools, so it works without tiring and fatigue unlike humans in manual testing
  • It can easily increase productivity because it provides fast & accurate testing result
  • Automated testing supports various applications
  • Testing coverage can be increased because of automation testing tools never forget to check even the smallest unit

> Cons of Automated Testing:

  • Without the human element, it’s difficult to get insight into visual aspects of your UI like colors, font, sizes, contrast, or button sizes.
  • The tools to run automation testing can be expensive, which may increase the cost of the testing project.
  • The automation testing tool is not yet foolproof. Every automation tool has its limitations which reduces the scope of automation.
  • Debugging the test script is another major issue in automated testing. Test maintenance is costly.

Conclusion:

In manual testing, there is a chance of human errors because here testing is done by humans. In automation testing, there is no chance of human errors because here testing is done by tools. In manual testing, there is a possibility of Exploratory testing. In automation testing, there is no permission for random testing

❤ ❤ 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.


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 a 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.


Flutter 3.3 — What’s New In Flutter

0

Google recently announced the release of the newly version of its cross platform mobile app development kit — Flutter 3.3

Flutter has merged 5,687 pull requests in bringing live the Flutter 3.3 bringing in more Material & Dart widgets , newly available renderer Impeller for speeding up the app performance and many more changes in the Inaugral day1 of the Community -Driven Conference Flutter Vikings serving the sole Focus on flutter & dart refinements & optimisation that strengthen performance . This update also introduces material 3 new components and scribble support without any-do to the ipad users , selectable text grouping , dart 2.18 including FFI support for libraries & code written in swift .

To get increased performance across desktop , web and mobile use

: flutter upgrade

Major Changes in the recent updated version are :

Global Selection

Flutter now provides the easiness of selecting the whole data in the web apps with a single sliding gesture by wrapping your widgets with SelectableArea widget. This not only provides richer & smoother control, but also lessen take amiss in certain places.

SelectableArea Widget

For a more deep dive into this awesome new feature, please visit the SelectableArea API page.

Wonderous: UI reference app

In order to show the world hidden capabilities of flutter UI Making , flutter team has developed the Wonderous app alongwith the gskinner team as an open- source project to exhibit flutter beautiful UI Experience showing the wonders of the world like Taj Mahal in the Indian city of Agra to the Mayan ruins of Chichén Itzá on the Yucatán peninsula of Mexico to your electronic devices using video & image representation to explore the perfect blended mixture of art, history & culture. The app is a visual delight along with some transient feature to look as a flutter developer including animations , performance techniques which would also be further shared by the team alongwith some generalisation and performant techniques in future weeks . For further news now and code navigate to the separate article here on the Flutter blog and respective playstores.

wonderous app built alongwith gskinner

Check this in github <Developers>

GitHub – gskinnerTeam/flutter-wonderous-app: A showcase app for the Flutter SDK. Wonderous will…
A showcase app for the Flutter SDK. Wonderous will educate and entertain as you uncover information about some of the…github.com

Check this in playstore

Wonderous – Apps on Google Play
Wonderous will educate and entertain as you uncover information about some of the most famous structures in the world…play.google.com

Impeller : New Graphic Engine

A new rendering engine as an experimental try out — Impeller is also available in this version replacing skia rendering engine having custom runtime to justify full use of modern hardware-accelerated graphics APIs such as Metal on iOS and Vulkan on Android delivering transient animation delivering faster refresh rate and eradicating the role of runtime shader compilation, main pain point of today’s apps making the scroll smooth. although it is still in production phase and a lot of optimisation is going on around for the same but it is available as a early preview in iOS.

Learn to enable it at : can be found on our wiki

Test it on the :Wonderous for iPhone from the Apple App Store

Report any issues, if found at :reproducible issue reports

Material Design Updates

Material updates now comes with many updates with mainly changes to chips , appbar & IconButton

These material widgets enhancement are not the default setting as now but you can opt-in to useMaterial3

Check this on github to know more about the updates

IconButton

Chip

Medium and large AppBar

Some Minor changes are :

Scribble

Scribbling is now supported by flutter 3.3 version as default by CupertinoTextField, TextField & EditableText. Flutter now supports Scribble handwriting input using Apple Pencil on iPadOS

contribution by : fbcouch

go_router

Navigation can turn head around in the app development process , flutter provide it’s own native navigation API ,go_router package a new version of this has been rolled out working seamlessly across mobile , desktop & web following a declarative approach enabling the package to easily navigate through deep links and redirect using asynchronous code in the migration guide available to view at the Navigation and routing page on flutter homepage .

Text input

Flutter now also provides the abiltiy to receive granular text updates from the platform’s TextInputPlugin which initially provides the new state with no delta b/w old and new , TextEditingDeltas and the DeltaTextInputClient fill this gap now. Having access to these deltas allows you to build an input field with styled ranges that expand and contract as you wite.

To Know more, Rich Text Editor demo.

VS Code extension enhancement

VS Code extensions now provides the flexibilty to app multiple dependencies in a go seperated by commas using Dart: Add Dependency.

KnowAbout the VS code extensions release after flutter 3 rollling out

DevTools Update

DevTools is undergoing major changes from the flutter 3 release including UX & optimisation to display tables for faster data , less hanged up scrolling of large lists of events .

Check Release Notes for devtools : Flutter DevTools 2.16.0 release notes

Windows

Currently the window desktop app verison was set by file specific to the window app itself making it inconsistent with the other platform setting their versioning now it can also be setup from the pubspec.yaml file and build arguments making auto updation easier for the customers to getting the latest version of app each time a new version is available

Raster cache improvements

Performance increase in image loading capabilities by elimation of copies and reducing Dart garbage collection (GC) pressure. Initially it was copied multiple times in order for it to compress to the native heap on opening and introducing to dart as a typed array and then second time to internal memory ui.ImmutableBuffer.

With the addition of ui.ImmutableBuffer.fromAsset, compressed image bytes can be loaded directly into the structure used for decoding. This approach requires changes to the byte loading pipeline of ImageProviders. This process lessen the time required to half as per our standards .

Check Adding ImageProvider.loadBuffer on flutter Homepage.

Raster Cache requirements

API improvements

PlatformDispatcher.onError

No further need to configure manually by creating a custom Zone to catch app errors & exceptions which slowed down application launch time . Now catch all errors and exceptions by setting the PlatformDispatcher.onError callback.

To Know More , check Handling errors in Flutter.

Changes To Supported Platform

32-bit iOS deprecation

Flutter will no longer be supporting the 32 bit iOS devices & iOS versions 9 &10 which would also mean that the further roll out will also not be supoorting same affecting iPhone 4S, iPhone 5, iPhone 5C, and the 2nd, 3d, and 4th generation iPad devices making some app not workable in such devices.

Bitcode deprecation

Bitcode will likely be eliminated and not acceptable for iOS app submission in the upcoming Xcode 14 release making it emit warning in build making in the current version , flutter would also drop support for bitcode in a future stable release.

Although it wont affect many developers as it is turned off default wise and not many developers usually enable it in their app project but if you do disable after migrating to Xcode 14.

See Apple’s documentation to learn more about bitcode distribution.

Bitcode depreciation

Summary

With the onset of 25,000 Flutter packages available for developers to choose among and the developers using them continue to publish more than 1,000 new apps to the Apple App and Google Play stores every day shows the community strength of flutter .Mainly, there is no such significant major updates that may appeal to your current projects but some solid performance improvements for apps .This new version has come up with some exciting features that will in turn be optimised by the community to make flutter drive in faster . Looking forward for each of the flutter developers to go through these new features.

Check out the launch on fluttervikings channel alongwith the whole playlist

For more on all the new features and improvements, check out the detailed Flutter 3.3 release notes and the Dart 2.18 announcement blog post.


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 a 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.

https://flutterdevs.com/

Explore Shimmer Animation Effect In Flutter

0

Loading times are unavoidable in application improvement. From a user experience (UX) viewpoint, the main thing is to show your users that loading is occurring. One mainstream way to deal with imparting to users that information is loading is to show a chrome tone with a shimmer animation over the shapes that inexact the sort of substance that is loading.

In this blog, we will Explore Shimmer Animation Effect In Flutter. We will see how to implement a demo program of the shimmer animation effect and show a loading animation effect using the shimmer package in your flutter applications.

shimmer | Flutter Package
A package provides an easy way to add a shimmer effect in Flutter project import ‘package: shimmer/shimmer.dart’…pub.dev

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

What is the shimmer animation effect?

Properties

Implementation

Code Implement

Code File

Conclusion



What is the shimmer animation effect?:

Shimmer is utilized to add wonderful animations while content is loading from the servers in an application. This makes the UI look more responsive and gets users from leaving a sluggish internet collaboration. It very well may be utilized rather than traditional ProgressBar or usual loaders accessible in the Flutter structure.

Typically at whatever point we open an application then we see a loading impact with decent animation. It demonstrates that the application loading the information either from the server or the local database. There are numerous approaches to show this loading impact. In this, we generally animate the widget which precisely resembles the first widget in the wake of loading the information.

Demo Module :

This demo video shows how to create a shimmer animation effect in a flutter. It shows how the shimmer animation effect will work using the shimmer package in your flutter applications. It shows when code successfully runs, then shows content is loading from dummy data is shimmer animation effect with duration and then loading is complete then content will be shown on your devices.

Properties:

There are some properties of shimmer animation effect:

  • > baseColor: Base Color of the Shimmer that gets displayed on the Widget. This color is essential as the child widget will be of this color as it were.
  • > highlightColor: Highlight Color is the color that delivers the shimmer-like impact. This color continues to wave across the child widget and it makes the Shimmer impact.
  • > child: The Child holds whatever widget needs to create the ShimmerEffect. Could be a Text Widget or an intricate design and the ShimmerEffect is created with no issue.
  • > direction: You can adjust the direction of the shimmer highlight color from left to right, right to left, start to finish, or base to top, to do so you simply need to pass ShimmerDirection with a determined direction.
  • > period: It controls the speed of the shimmer effect. The default value is 1500 milliseconds.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

shimmer: ^3.0.0

Step 2: Import

import 'package:shimmer/shimmer.dart';

Step 3: Run flutter packages get in the root directory of your app.

How to implement code in dart file :

You need to implement it in your code respectively:

Create a new dart file called movie_model.dart inside the lib folder.

class MovieModel {
final String urlImg;
final String title;
final String detail;

const MovieModel({required this.urlImg,
required this.title,
required this.detail});
}

We will create a class MovieModel. In this class, we will create three final strings was urlImg, title, and detail. We also create a constructor of all strings items.

Create a new dart file called movie_data.dart inside the lib folder.

import 'package:flutter_shimmer_animation/model/movie_model.dart';

List<MovieModel> allMovies =[

MovieModel(
urlImg:'https://gumlet.assettype.com/bloombergquint%2F2019-04%2F4c894d41-181f-4c8c-8630-4604a6d51d05%2Favengers_infinity_war_and_endgame_poster_w7_1600x900.jpg?rect=0%2C0%2C1250%2C900&auto=format%2Ccompress&w=480&dpr=2.6',
title:'Avengers: Endgame',
detail:'It s a 2019 American superhero film based '
),
MovieModel(
urlImg:'https://townsquare.media/site/442/files/2014/08/The-Expendables.jpg?w=980&q=75',
title:'The Expendables 3',
detail:'The Expendables 3 is a 2014 American action '
),
MovieModel(
urlImg:'https://img.etimg.com/thumb/msid-71454408,width-650,imgsize-242226,,resizemode-4,quality-100/war-1.jpg',
title:'War',
detail:'War is a 2019 Indian Hindi-language action '
),
MovieModel(
urlImg:'https://iadsb.tmgrup.com.tr/de9f7e/1200/627/0/0/1000/522?u=https://idsb.tmgrup.com.tr/2019/12/22/1577016105167.jpg',
title:'Jumanji: The Next Level',
detail:'Jumanji: The Next Level is a 2019 American '
),
MovieModel(
urlImg:'https://evertise.net/wp-content/uploads/2021/06/image-366.png',
title:'Fast & Furious 9',
detail:'Dom Toretto`s peaceful life off the grid.'
)

];

In this dart file, we will create a list of movies. We will add five dummy data of MovieModel. We add five different data of urlImg, title, and detail.

Create a new dart file called custom_widget.dart inside the lib folder.

import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class CustomWidget extends StatelessWidget {

final double width;
final double height;
final ShapeBorder shapeBorder;

const CustomWidget.rectangular({
this.width = double.infinity,
required this.height
}): this.shapeBorder = const RoundedRectangleBorder();

const CustomWidget.circular({
this.width = double.infinity,
required this.height,
this.shapeBorder = const CircleBorder()
});

@override
Widget build(BuildContext context) => Shimmer.fromColors(
baseColor: Colors.red,
highlightColor: Colors.grey[300]!,
period: Duration(seconds: 2),
child: Container(
width: width,
height: height,
decoration: ShapeDecoration(
color: Colors.grey[400]!,
shape: shapeBorder,

),
),
);
}

In CustomWidget will extend with StatelessWidget. Inside, we will add three final constructors was double width, double height, and shapeBorder. Create two custom widgets for rectangular() and circular(). In the build method, we will add Shimmer.fromColors(). Insidewe will add the base color was red, highlightColor was grey, and also add period. In child property, we will add Container. Inside, we will add width, height and add ShapeDecoration().

Create a new dart file called my_home_page.dart inside the lib folder.

First, we will create a List <MovieModel> movies is equal to bracket and bool isLoading is equal to false,

List<MovieModel> movies = [];
bool isLoading = false;

We will create an initState() method. In this method, we will add the loadData() method.

@override
void initState() {
// TODO: implement initState
super.initState();

loadData();
}

We will define loadData() method.

We will create a Future loadData() method. In this method, we will add setState() function. In this function, we will add isLoading is equal to true. Add an await future delay duration for loading and movies is equal to the list of (allMovies). Again, we will add setState() function. In this function, we will add isLoading is equal to false.

Future loadData() async {
setState(() {
isLoading = true;
});
await Future.delayed(Duration(seconds: 2));
movies = List.of(allMovies);
setState(() {
isLoading = false;
});
}

We will create a buildMovieList(). In this method, we will add ListTile() widget. In this widget, we will add leading. In this leading, we will create CircleAvatar with a radius is 30 and add backgroundImage as NetworkImage from MovieModel. Add a title, subtitle from the MovieModel list.

Widget buildMovieList(MovieModel model) =>
ListTile(
leading: CircleAvatar(
radius: 30,
backgroundImage: NetworkImage(model.urlImg),
),
title: Text(model.title, style: TextStyle(fontSize: 16),),
subtitle: Text(
model.detail, style: TextStyle(fontSize: 14), maxLines: 1,),
)

We will create one more widget that was buildMovieShimmer(). In this method, we will add ListTile() widget. In this widget, we will add leading, title, subtitle from CustomWidget().

Widget buildMovieShimmer() =>
ListTile(
leading: CustomWidget.circular(height: 64, width: 64),
title: Align(
alignment: Alignment.centerLeft,
child: CustomWidget.rectangular(height: 16,
width: MediaQuery.of(context).size.width*0.3,),
),
subtitle: CustomWidget.rectangular(height: 14),
);

In the body part, we will add ListView.builder(). Inside, add itemCount and itemBuilder. In itemBuilder, we will add condition if isLoading then return buildMovieShimmer() widget else we will return final movie is equal to the movies[index] and return buildMovieList (movie);

ListView.builder(
itemCount: isLoading? 5: movies.length,
itemBuilder: (context, index) {
if (isLoading) {
return buildMovieShimmer();
} else {
final movie = movies[index];
return buildMovieList(movie);
}
}
),

When we run the code, first will show a shimmer effect when the data was loaded, we ought to get the screen’s output like the underneath screen capture.

Shimmer Animation Effect(Data loading)

When data successfully load, then shimmer was stopped and all data will show on your screen. We will also add a refresh button on an appBar() for the shimmer effect.actions:

 [
IconButton(
icon: Icon(Icons.refresh),
onPressed: loadData)
],

When we run the application, we ought to get the screen’s output like the underneath screen capture.

Output

Code File:

import 'package:flutter/material.dart';
import 'package:flutter_shimmer_animation/custom_widget.dart';
import 'package:flutter_shimmer_animation/data/movie_data.dart';
import 'package:flutter_shimmer_animation/model/movie_model.dart';

class MyHomePage extends StatefulWidget {

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

class _MyHomePageState extends State<MyHomePage> {
List<MovieModel> movies = [];
bool isLoading = false;

@override
void initState() {
// TODO: implement initState
super.initState();

loadData();
}
Future loadData() async {
setState(() {
isLoading = true;
});
await Future.delayed(Duration(seconds: 2));
movies = List.of(allMovies);
setState(() {
isLoading = false;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
backgroundColor: Colors.teal,
title: Text("Shimmer Animation Effect"),
actions: [
IconButton(
icon: Icon(Icons.refresh),
onPressed: loadData)
],
),
body: ListView.builder(
itemCount: isLoading? 5: movies.length,
itemBuilder: (context, index) {
if (isLoading) {
return buildMovieShimmer();
} else {
final movie = movies[index];
return buildMovieList(movie);
}
}
),

);
}

Widget buildMovieList(MovieModel model) =>
ListTile(
leading: CircleAvatar(
radius: 30,
backgroundImage: NetworkImage(model.urlImg),
),
title: Text(model.title, style: TextStyle(fontSize: 16),),
subtitle: Text(
model.detail, style: TextStyle(fontSize: 14), maxLines: 1,),
);

Widget buildMovieShimmer() =>
ListTile(
leading: CustomWidget.circular(height: 64, width: 64),
title: Align(
alignment: Alignment.centerLeft,
child: CustomWidget.rectangular(height: 16,
width: MediaQuery.of(context).size.width*0.3,),
),
subtitle: CustomWidget.rectangular(height: 14),
);

}

Conclusion:

In the article, I have explained the Shimmer Animation Effect basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Shimmer Animation Effect On User Interaction from my side, and it’s working using Flutter.

I hope this blog will provide you with sufficient information on Trying up the Shimmer Animation Effect in your flutter projectsWe will show you what the Shimmer Animation Effect is?. Some shimmer animation effects properties, make a demo program for working Shimmer Animation Effect and It shows when code successfully runs, then shows content is loading from dummy data is shimmer animation effect with duration and then loading is complete then content will be shown on your devices. Show a loading animation effect using the shimmer package in your flutter applications. So please try it.

❤ ❤ 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.


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 a 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 FacebookGitHubTwitter, 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.