Google search engine
Home Blog Page 68

Explore Custom Fade-In Slide In Flutter

0

This article will be Explore Custom Fade-In Slide In Flutter. We see how to execute a demo program. We will tell you the best way how to create custom fade-in slide animation to bring dynamic interactive effects to your UI in your Flutter applications.

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

Code Implement

Code File

Conclusion



Introduction

The below demo video shows how to create a custom fade-in slide in Flutter and how a custom fade-in slide will work in your Flutter applications. We will create a custom fade-in slide widget to bring dynamic interactive effects to our UI. It will be shown on your device.

Demo Module::



Code Implement:

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

First, we will define an animation direction
enum FadeDirection { ttb, btt, ltr, rtl }

Now, we will create a CustomFadeInSlide() StatefulWidget on the same main .dart file. This represents the combined fade and slide animation. It takes parameters such as child, duration, fadeOffset, curve, and direction.

class CustomFadeInSlide extends StatefulWidget {
const CustomFadeInSlide({
super.key,
required this.child,
required this.duration,
this.curve = Curves.bounceOut,
this.fadeOffset = 40,
this.direction = FadeDirection.ttb,
});

final Widget child;
final double duration;
final double fadeOffset;
final Curve curve;
final FadeDirection direction;
@override
State<CustomFadeInSlide> createState() => _CustomFadeInSlideState();
}

class _CustomFadeInSlideState extends State<CustomFadeInSlide>
with TickerProviderStateMixin {
late AnimationController controller;
late Animation<double> opacityAnimation;
late Animation<double> inAnimation;

@override
void initState() {
super.initState();

controller = AnimationController(
duration: Duration(milliseconds: (1000 * widget.duration).toInt()),
vsync: this);

inAnimation = Tween<double>(begin: -widget.fadeOffset, end: 0).animate(
CurvedAnimation(
parent: controller,
curve: widget.curve,
),
)..addListener(() {
setState(() {});
});

opacityAnimation = Tween<double>(begin: 0, end: 1).animate(controller)
..addListener(() {
setState(() {});
});
}

@override
Widget build(BuildContext context) {
final size = MediaQuery.sizeOf(context);
controller.forward();
return Transform.translate(
offset: switch (widget.direction) {
FadeDirection.ltr => Offset(inAnimation.value, 0),
FadeDirection.rtl => Offset(size.width - inAnimation.value, 0),
FadeDirection.ttb => Offset(0, inAnimation.value),
FadeDirection.btt => Offset(0, 0 - inAnimation.value),
},
child: Opacity(
opacity: opacityAnimation.value,
child: widget.child,
),
);
}

@override
void dispose() {
controller.dispose();
super.dispose();
}
}

CustomFadeInSlideState manages the AnimationController, opacityAnimation, and inAnimation.

Now, we will create an initState() method. In this method, we will add a controller that is equal to the AnimationController(), inAnimation is equal to the Tween<double>,addListener, and opacityAnimation. Then, we will create a dispose() method. In this method, we will add a controller. dispose().

In the build part, we will return a Transform. translate() method. In this method, we will calculate the offset based on the specified direction and its child we will add Opacity widgets are used to apply fade and slide animations.

We will create a MyHomePage() class on the same dart file.

In the body part, we will add a Column widget. In this widget, we will add the three items. We will add two images and text that will wrap into CustomFadeInSlide with different directions and different durations.

Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
CustomFadeInSlide(
duration: 2,
direction: FadeDirection.ttb,
child: Image.asset(
"assets/logo.png",
height: 150,
),
),
const SizedBox(
height: 40,
),
const CustomFadeInSlide(
duration: 4,
direction: FadeDirection.ltr,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Text(
'FlutterDevs specializes in creating cost-effective and efficient '
'applications with our perfectly crafted, creative and leading-edge '
'flutter app development solutions for customers all around the globe.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16,fontWeight: FontWeight.w500),
),
)),
const SizedBox(
height: 30,
),
CustomFadeInSlide(
duration: 6,
direction: FadeDirection.btt,
child: Image.asset(
"assets/powered_by.png",
height: 150,
),
),
],
)

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

Code File:

import 'package:flutter/material.dart';
import 'package:flutter_custom_fade_in_slide_deno/splash_screen.dart';

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

class MyApp extends StatelessWidget {
const MyApp({super.key});

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
home: Splash(),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});

final String title;

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

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
backgroundColor: Colors.cyanAccent,
title: Text(widget.title),
centerTitle: true,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
CustomFadeInSlide(
duration: 2,
direction: FadeDirection.ttb,
child: Image.asset(
"assets/logo.png",
height: 150,
),
),
const SizedBox(
height: 40,
),
const CustomFadeInSlide(
duration: 4,
direction: FadeDirection.ltr,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Text(
'FlutterDevs specializes in creating cost-effective and efficient '
'applications with our perfectly crafted, creative and leading-edge '
'flutter app development solutions for customers all around the globe.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16,fontWeight: FontWeight.w500),
),
)),
const SizedBox(
height: 30,
),
CustomFadeInSlide(
duration: 6,
direction: FadeDirection.btt,
child: Image.asset(
"assets/powered_by.png",
height: 150,
),
),
],
),
),
);
}
}

enum FadeDirection { ttb, btt, ltr, rtl }

class CustomFadeInSlide extends StatefulWidget {
const CustomFadeInSlide({
super.key,
required this.child,
required this.duration,
this.curve = Curves.bounceOut,
this.fadeOffset = 40,
this.direction = FadeDirection.ttb,
});

final Widget child;
final double duration;
final double fadeOffset;
final Curve curve;
final FadeDirection direction;

@override
State<CustomFadeInSlide> createState() => _CustomFadeInSlideState();
}

class _CustomFadeInSlideState extends State<CustomFadeInSlide>
with TickerProviderStateMixin {
late AnimationController controller;
late Animation<double> opacityAnimation;
late Animation<double> inAnimation;

@override
void initState() {
super.initState();

controller = AnimationController(
duration: Duration(milliseconds: (1000 * widget.duration).toInt()),
vsync: this);

inAnimation = Tween<double>(begin: -widget.fadeOffset, end: 0).animate(
CurvedAnimation(
parent: controller,
curve: widget.curve,
),
)..addListener(() {
setState(() {});
});

opacityAnimation = Tween<double>(begin: 0, end: 1).animate(controller)
..addListener(() {
setState(() {});
});
}

@override
Widget build(BuildContext context) {
final size = MediaQuery.sizeOf(context);
controller.forward();
return Transform.translate(
offset: switch (widget.direction) {
FadeDirection.ltr => Offset(inAnimation.value, 0),
FadeDirection.rtl => Offset(size.width - inAnimation.value, 0),
FadeDirection.ttb => Offset(0, inAnimation.value),
FadeDirection.btt => Offset(0, 0 - inAnimation.value),
},
child: Opacity(
opacity: opacityAnimation.value,
child: widget.child,
),
);
}

@override
void dispose() {
controller.dispose();
super.dispose();
}
}

Conclusion:

In the article, I have explained the Custom Fade-In Slide In Flutter; you can modify this code according to your choice. This was a small introduction to the Custom Fade-In Slide In Flutter User Interaction from my side, and it’s working using Flutter.

I hope this blog will provide you with sufficient information on Trying Custom Fade-In Slide in your Flutter projects. We will show you what the Introduction is. Make a demo program for working on the Custom Fade-In Slide in your Flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

If I need to correct something? 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.


What Is Test Documentation In Flutter

0

Hi everyone! today we learn about What Is Test Documentation In Flutter. Testing documentation involves the documentation of artifacts that should be developed before or during the testing of Software. Documentation for software testing helps in estimating the testing effort required, test coverage, requirement tracking/tracing, etc. For more please go through the below content.

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 Test Documentation?

Why Test Formality?

Examples of Test Documentation

Best practice to Achieve Test Documentation

Advantages of Test Documentation

Disadvantages of Test Documentation

Summary

Conclusion


What is Test Documentation?

Test documentation is documentation of artifacts created before or during the testing of software. It helps the testing team estimate the testing effort needed, test coverage, resource tracking, execution progress, etc.

It is a complete suite of documents that allows you to describe and document test planning, test design, test execution, and test results that are drawn from the testing activity.

Why Test Formality?

For a newbie, it’s easy to assume that Testing is executing the various section of code on an ad-hoc basis and verifying the results. But in the real world, Testing is a very formal activity and is documented in detail. Test Documentation makes planning, review, and execution of testing easy as well as verifiable.

The degree of test formality depends on

  • The type of application under test
  • Standards followed by your organization
  • The maturity of the development process.

Testing activities generally consume 30% to 50% of software development project effort. Documentations help to identify Test process improvements that can be applied to future projects.

Examples of Test Documentation:

Here, are important Types of Test Documentation:

  • > Test policy:- It is a high-level document that describes principles, methods, and all the important testing goals of the organization.
  • > Test strategy:- A high-level document that identifies the Test Levels (types) to be executed for the project.
  • > Test plan:- A test plan is a complete planning document that contains the scope, approach, resources, schedule, etc. of testing activities.
  • > Requirements Traceability Matrix:- This is a document that connects the requirements to the test cases.
  • > Test Scenario:- Test scenario is an item or event of a software system that could be verified by one or more Test cases.
  • > Test case:- It is a group of input values, execution preconditions, expected execution postconditions, and results. It is developed for a Test Scenario.
  • > Test Data:- Test Data is data that exists before a test is executed. It is used to execute the test case.
  • > Defect Report:- Defect report is a documented report of any flaw in a Software System that fails to perform its expected function.
  • > Test summary report:- Test summary report is a high-level document that summarizes testing activities conducted as well as the test result.

Best practice to Achieve Test Documentation:

  • QA team needs to be involved in the initial phase of the project so that Test Documentation is created in parallel
  • Don’t just create and leave the document, but update it whenever required
  • Use version control to manage and track your documents
  • Try to document what is needed for you to understand your work and what you will need to produce to your stakeholders
  • You should use a standard template for documentation like an excel sheet or doc file
  • Store all your project-related documents at a single location. It should be accessible to every team member for reference as well as to update when needed
  • Not providing enough detail is also a common mistake while creating a test document

Advantages of Test Documentation:

  • The main reason behind creating test documentation is to either reduce or remove any uncertainties about the testing activities. Helps you to remove ambiguity which often arises when it comes to the allocation of tasks
  • Documentation not only offers a systematic approach to software testing, but it also acts as training material for freshers in the software testing process
  • It is also a good marketing & sales strategy to showcase Test Documentation to exhibit a mature testing process
  • Test documentation helps you to offer a quality product to the client within specific time limits
  • In Software Engineering, Test Documentation also helps to configure or set up the program through the configuration document and operator manuals
  • Test documentation helps you to improve transparency with the client

Disadvantages of Test Documentation:

  • The cost of the documentation may surpass its value as it is very time-consuming
  • Many times, it is written by people who can’t write well or who don’t know the material
  • Keeping track of changes requested by the client and updating corresponding documents is tiring.
  • Poor documentation directly reflects the quality of the product as a misunderstanding between the client and the organization can occur

Summary:

  • Test documentation is documentation of artifacts created before or during the testing of software.
  • The degree of test formality depends on 1) the type of application under test 2) the standards followed by your organization 3) the maturity of the development process.
  • Important types of Test Documents are Test policy, Test strategy, Test plan, Test case, etc.
  • QA team needs to be involved in the initial phase of the project so that Test Documentation is created in parallel
  • The main reason behind creating test documentation is to either reduce or remove any uncertainties about the testing activities.
  • The cost of the documentation may surpass its value as it is very time-consuming

Conclusion :

Testing without documentation makes it difficult to see the complete picture of the project. Unless you have clear objectives, a step-by-step plan to achieve them, and all the important conditions specified in a document, an outcome remains blurry.

Software testing documentation is usually essential during the project development/testing process. So, wherever feasible, keep everything documented. Do not rely completely on verbal communication. Always err on the side of caution.

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

What Is Test Environment for Software Testing In Flutter

0

Hi everyone! today we learn about What Is Test Environment for Software Testing In Flutter. A Test environment is where the testing teams analyze the quality of the application/program. This also allows computer programmers to identify and fix any bugs that may impact the smooth functioning of the application or impair user experience. Let’s learn in more detail.

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 a Test Environment?

Key areas to set up in Test Environment

Process of Software Test environment setup

Test Environment Management

Test Environment Checklist

Challenges in setting up Test Environment Management

Best practices for setting up a Test Environment Management

What is Test Bed in Software Testing?

Summary

Conclusion


What is a Test Environment?

A testing environment is a setup of software and hardware for the testing teams to execute test cases. In other words, it supports test execution with hardware, software and network configured.

The testbed or test environment is configured as per the need of the Application Under Test. On a few occasions, the test bed could be the combination of the test environment and the test data it operates.

Setting up the right test environment ensures software testing success. Any flaws in this process may lead to extra costs and time for the client.

Key areas to set up in Test Environment:

For the test environment, a key area to set up includes

  • System and applications
  • Test data
  • Database server
  • Front-end running environment
  • Client operating system
  • Browser
  • Hardware includes Server Operating system
  • Network
  • Documentation required like reference documents/configuration guides/installation guides/ user manuals

Process of Software Test environment setup:

Tests are limited to what can be tested and what not should be tested.

The following people are involved in the test environment setup

  • System Admins,
  • Developers
  • Testers
  • Sometimes users or techies with an affinity for testing.

The test environment requires setting up of various number of distinct areas like,

  • > Setup of Test Server:

Every test may not be executed on a local machine. It may need to establish a test server, which can support applications.

For example, Fedora is set up for PHP, Java-based applications with or without mail servers, crone setup, Java-based applications, etc.

  • > Network:

Network set up as per the test requirement. It includes,

  • Internet setup
  • LAN WIFI setup
  • Private network setup

It ensures that the congestion that occurs during testing doesn’t affect other members. (Developers, designers, content writers, etc.)

  • > Test PC setup:

For web testing, you may need to set up different browsers for different testers. For desktop applications, you need various types of OS for different testers’ PCs.

For example, windows phone app testing may require

  • Visual Studio installation
  • Windows phone emulator
  • Alternatively, assign a windows phone to the tester.
  • > Bug Reporting:

Bug reporting tools should be provided to testers.

  • > Creating Test Data for the Test Environment:

Many companies use a separate test environment to test the software product. The common approach used is to copy production data to test. This helps the tester, to detect the same issues as a live production server, without corrupting the production data.

The approach for copying production data to test data includes,

  • Set up production jobs to copy the data to a common test environment
  • All PII (Personally Identifiable Information) is modified along with other sensitive data. The PII is replaced with logically correct, but non-personal data.
  • Remove data that is irrelevant to your test.

Testers or developers can copy this to their test environments. They can modify it as per their requirement.

Privacy is the main issue in copy production data. To overcome privacy issues you should look into obfuscated and anonymized test data.

For the Anonymization of data two approaches can be used,

  • BlackList: In this approach, all the data fields are left unchanged. Except those fields specified by the users.
  • WhiteList: By default, this approach, anonymizes all data fields. Except for a list of fields that are allowed to be copied. A whitelisted field implies that it is okay to copy the data as it is and anonymization is not required.

Also, if you are using production data, you need to be smart about how to source data. Querying the database using SQL script is an effective approach.

Test Environment Management:

Test Environment Management deals with the maintenance and upkeep of the test bed.

A list of activities by the Test environment management function includes,

  1. Maintenance of a central repository with all the updated versions of test environments.
  2. Test environment management as per the test team’s demands.
  3. As per the new requirements creating new environments
  4. Monitoring of the environments
  5. Updating/deleting outdated test-environments
  6. Investigation of issues in the environment
  7. Coordination till an issue resolution.

Test Environment Checklist:

Besides these, there are a few more questions to answer before setting up the test environment.

  • Whether to develop an internal Test Environment or to outsource?
  • Whether to follow an internal company standard or follow any External (IEE, ISO, etc.)?
  • How long the test environment is required?
  • Differences between the test and production systems and their impact on test validity must be determined.
  • Can you re-use an existing setup for other projects in the company?

Challenges in setting up Test Environment Management:

  1. Proper planning on resource usage Ineffective planning for resource usage can affect the actual output. Also, it may lead to conflict between teams.
  2. Remote environment It is possible that a Test environment is located geographically apart. In such a case, the testing team has to rely on the support team for various test assets. (Software, hardware, and other issues).
  3. Elaborate setup time Sometimes test setup gets too elaborated in cases of Integration Testing.
  4. Shared usage by teams If the testing environment is used by development & testing teams simultaneously, test results will be corrupted.
  5. Complex test configuration Certain test requires complex test environment configuration. It may pose a challenge to the test team.

Best practices for setting up a Test Environment Management:

  1. Understand the test requirements thoroughly and educate the test team members.
  2. Connectivity should be checked before the initiation of the testing
  3. Check for the required hardware and software, licenses
  4. Browsers and versions
  5. Planning out the Scheduled use of the test environment.
  6. Automation tools and their configurations.

What is Test Bed in Software Testing?

A Test Bed in Software Testing is a software development environment. It allows developers to test their modules without affecting the live production servers. The testbed is not only confined to developers but is also used by testers. It is referred to as a test environment for rigorous and transparent testing of new technologies.

Summary:

  • A testing environment is a setup of software and hardware on which the test team will conduct the testing
  • For the test environment, a key area to set up includes
  • System and applications
  • Test data
  • Database server
  • Front-end running environment, etc.
  • Few challenges while setting up a test environment include,
  • Remote environment
  • Combined usage between teams
  • Elaborate setup time
  • Ineffective planning for resource usage for integration
  • Complex test configuration

Conclusion:

If you are into the test environment, hoping that this article helped you in the field of the test environment. The most important usage of the test environment is it enables testers to modify data without affecting any real-time information.

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

Test Plan Template: Sample Document with Web Application In Flutter

0

Hi everyone! today we learn about the What Is Test Plan Template. Test Plan Template is a detailed document that describes the test strategy, objectives, schedule, estimation and deliverables, and resources required for testing. A test Plan helps us determine the effort needed to validate the quality of the application under test. Let’s start in a detailed way.

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 a test plan template?

Sample Test Plan Document Banking Web Application Example

Process of Software Test environment setup

Conclusion


What is a test plan template?

Test Plan Template is a detailed document that describes the test strategy, objectives, schedule, estimation and deliverables, and resources required for testing. A test Plan helps us determine the effort needed to validate the quality of the application under test. The test plan serves as a blueprint to conduct software testing activities as a defined process that is minutely monitored and controlled by the test manager.

Creating a Test Plan is mandatory to ensure the success of your Software testing project. If you are new to Test Planning refer to this tutorial on How to Create a Test Plan.

1) Introduction:

Brief introduction of the test strategies, process, workflow, and methodologies used for the project.

1.1) Scope

1.1.1) In Scope

Scope defines the features and functional or non-functional requirements of the software that will be tested.

1.1.2) Out of Scope

Out Of Scope defines the features and functional or non-functional requirements of the software that will NOT be tested.

1.2) Quality Objective

Here make a mention of the overall objective that you plan to achieve with your manual testing and automation testing.

Some objectives of your testing project could be

  • Ensure the Application Under Test conforms to functional and non-functional requirements
  • Ensure the AUT meets the quality specifications defined by the client
  • Bugs/issues are identified and fixed before going live

1.3) Roles and Responsibilities

A detailed description of the Roles and responsibilities of different team members like

  • QA Analyst
  • Test Manager
  • Configuration Manager
  • Developers
  • Installation Team

Amongst others

2) Test Methodology:

2.1) Overview

Mention the reason for adopting a particular test methodology for the project. The test methodology selected for the project could be

  • Waterfall
  • Iterative
  • Agile
  • Extreme Programming

The methodology selected depends on multiple factors.

2.2) Test Levels

Test Levels define the Types of Testing to be executed on the Application Under Test (AUT). The Testing Levels primarily depend on the scope of the project, and time and budget constraints.

2.3) Bug Triage

The goal of the triage is to

  • To define the type of resolution for each bug
  • To prioritize bugs and determine a schedule for all “To Be Fixed Bugs’.

2.4) Suspension Criteria and Resumption Requirements

Suspension criteria define the criteria to be used to suspend all or part of the testing procedure while Resumption criteria determine when testing can resume after it has been suspended

2.5) Test Completeness

Here you define the criteria that will deem your testing complete.

For instance, a few criteria to check Test Completeness would be

  • 100% test coverage
  • All Manual & Automated Test cases executed
  • All open bugs are fixed or will be fixed in the next release

3) Test Deliverables:

Here mention all the Test Artifacts that will be delivered during different phases of the testing lifecycle.

Here are the simple deliverables

  • Test Plan
  • Test Cases
  • Requirement Traceability Matrix
  • Bug Reports
  • Test Strategy
  • Test Metrics
  • Customer Sign Off

4) Resource & Environment Needs:

4.1) Testing Tools

Make a list of Tools like

  • Requirements Tracking Tool
  • Bug Tracking Tool
  • Automation Tools

Required to test the project

4.2) Test Environment

It mentions the minimum hardware requirements that will be used to test the Application.

The following software’s are required in addition to client-specific software.

  • Windows 8 and above
  • Office 2013 and above
  • MS Exchange, etc.

5) Terms/Acronyms:

Make a mention of any terms used in the project.

API: Application Program Interface

AUT: Application Under Test

Sample Test Plan Document Banking Web Application Example:

1) Introduction:

The Test Plan is designed to prescribe the scope, approach, resources, and schedule of all testing activities of the project Guru99 Bank.

The plan identified the items to be tested, the features to be tested, the types of testing to be performed, the personnel responsible for testing, the resources and schedule required to complete testing, and the risks associated with the plan.

1.1 Scope

1.1.1 In Scope

All the features of websiteGuru99 Bank which were defined in software requirement specs need to be tested

1.1.2 Out of Scope

These features are not tested because they are not included in the software requirement specs

  • User Interfaces
  • Hardware Interfaces
  • Software Interfaces
  • Database logical
  • Communications Interfaces
  • Website Security and Performance

1.2 Quality Objective:

The test objectives are to verify the functionality of the website Guru99 Bank, the project should focus on testing banking operations such as Account Management, Withdrawal, Balance…etc. to guarantee all these operations can work normally in the real business environment.

1.3 Roles and Responsibilities:

The project should use outsourced members as the tester to save the project cost.

2) Test Methodology:

2.1 Overview

2.2 Test Levels

In the project Guru99 Bank, 3 types of testing should be conducted.

  • Integration Testing (Individual software modules are combined and tested as a group)
  • System Testing: Conducted on a complete, integrated system to evaluate the system’s compliance with its specified requirements
  • API testing: Test all the APIs create for the software under tested

2.3 Bug Triage

2.4 Suspension Criteria and Resumption Requirements

If the team members report that there are 40% of test cases failed, suspend testing until the development team fixes all the failed cases.

2.5 Test Completeness

  • Specifies the criteria that denote successful completion of a test phase
  • The run rate is mandatory to be 100% unless a clear reason is given.
  • The pass rate is 80%, achieving the pass rate is mandatory

2.6 Project task and estimation and schedule

Schedule to complete these tasks

3 )Test Deliverables:

Test deliverables are provided as below

Before testing phase

  • Test plans document.
  • Test cases documents
  • Test Design specifications.

During the testing

– Test Tool Simulators.

– Test Data

– Test Traceability Matrix — Error logs and execution logs.

After the testing cycle is over

  • Test Results/reports
  • Defect Report
  • Installation/ Test procedures guidelines
  • Release notes

4 Resource & Environment Needs:

4.1 Testing Tools

4.2 Test Environment

Test Environment to be set up as per figure below:

What Is Test Environment for Software Testing In Flutter
A Test environment is where the testing teams analyze the quality of the application/program. This also allows computer…medium.flutterdevs.com

Conclusion:

Test plan document as a project plan for your testing process. This means that the test plan conveys how testing will be performed at a particular level (such as system testing or user acceptance testing), or for a particular type of testing (such as performance testing or security testing).

This includes the purpose of the Test Plan i.e. scope, approach, resources, and schedule of the testing activities. To identify the items being tested features to be tested, testing tasks to be performed, personnel responsible for each task, the risks associated with this plan, etc.

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

Payment Gateway Testing with Test Cases In Flutter

0

Hi everyone! today we learn about Payment Gateway Testing with Test Cases In Flutter. Payment Gateway is a system for online purchases and transactions by users. A payment gateway system is an e-commerce application service that approves credit card payments for online purchases.

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::

Payment Gateway Testing

Types of Payment Gateway System

Testing Types for Payment DomainScrum Pillars

How to test the Payment Gateway Complete Checklist

Example Test Cases for Payment Gateway Testing

Things to consider before Buying the Gateway Package

Conclusion


Payment Gateway Testing:

Payment Gateway Testing is the testing of a Payment Gateway in a system for online purchases and transactions by the users. The purpose of payment gateway testing is to ensure the security, reliability, and performance of a payment gateway by encrypting and securing the payment details between user and merchant while providing a smooth payment experience.

A payment gateway system is an e-commerce application service that approves credit card payments for online purchases. Payment gateways safeguard credit card details by encrypting sensitive information like credit card numbers, account holder details, and so on. This information is passed safely between the customer and the merchant and vice versa.

Modern payment gateways also securely approve payments via debit cards, electronic bank transfers, cash cards, reward points, etc.

Types of Payment Gateway System:

Payment Gateway Knowledge is Important

  • Hosted Payment Gateway: Hosted payment gateway system directs customers away from an e-commerce site to a gateway link during the payment process. Once the payment is done, it will bring a customer back to an e-commerce site. 
    For such type of payment you don’t need a merchant id, an example of a hosted payment gateway are PayPal, Noche, and WorldPay.
  • Shared Payment Gateway: In a shared payment gateway, while processing payment customer is directed to the payment page and stays on the e-commerce site. 
    Once the payment detail is filled in, the payment process proceeds. Since it does not leave the e-commerce site while processing payment, this mode is easy and preferable, an example of a shared payment gateway is eWay, Stripe.

Testing Types for Payment Domain:

Testing for Payment Gateway should include

  • Functional Testing: It is the act of testing the base functionality of the payment gateway. It is to verify whether the application behaves in the same way as it is supposed to like handling orders, calculation, the addition of VAT as per the country, etc.
  • Integration: Test integration with your credit card service.
  • Performance: Identify various performance metrics like the highest possible number of users coming through gateways during a specific day and converting them to concurrent users
  • Security: You need to perform a deep security pass for Payment Gateway.

How to test the Payment Gateway Complete Checklist:

Before you begin testing –

  • Collect accurate test data for the dummy credit card number for the maestro, visa, master, etc.
  • Collect payment gateway information like Google Wallet, Paypal, or else
  • Collect payment gateway documents with error codes
  • Understand the session and parameters passed through the application and payment gateway
  • Understand and test the amount of related information passed through query string or variable or session
  • Along with the payment gateway language check the language of the application
  • Under the various payment gateway settings like currency format, subscriber data is collected.

Example Test Cases for Payment Gateway Testing:

Following are important Test Scenarios/Cases to check Payment Gateway

  1. During the payment process try to change the payment gateway language
  2. After successful payment, test all the necessary components, whether it is retrieved or not
  3. Check what happens if the payment gateway stops responding during the payment
  4. During the payment process check what happens if the session ends
  5. During the payment process check what happens in the backend
  6. Check what happens if the payment process fails
  7. Check the Database entries whether they store credit card details or not
  8. During the payment process check the error pages and security pages
  9. Check the settings of the pop-up blocker, and see what happens if a pop-up blocker is on and off
  10. Between payment gateway and application check buffer pages
  11. Check on successful payment, a success code is sent to the application and a confirmation page is shown to the user
  12. Verify whether the transaction processes immediately or the processing is handed to your bank
  13. After a successful transaction check if the payment gateway returns to your application
  14. Check all formats and messages when the successful payment process
  15. Unless you don’t have an authorization receipt from the payment gateway, goods should not be shipped
  16. Inform the owner of any transaction processed through e-mail. Encrypt the content of the mail
  17. Check the amount format with the currency format
  18. Check if each of the payment options is selectable
  19. Check if each listed payment option opens the respective payment option according to the specification
  20. Verify whether the payment gateway defaults to the desired debit/credit card option
  21. Verify the default option for debit card shows the card selection drop-down menu

Things to consider before Buying the Gateway Package:

  • If you have bought a shopping cart package, find out about its compatibility
  • If a shopping gateway package is due, ask the payment gateway provider for a list of supported applications
  • The gateway must offer Address Verification System Protection
  • Find out the types of transaction protection being offered
  • Check what types of debit or credit cards are accepted by your chosen payment gateway
  • Check the transaction fees levied by a payment gateway
  • Check whether the gateways collect the payment right on the form or directly to another page to complete the purchase

Conclusion:

A payment gateway must provide a seamless experience in the realm of online transactions, for which it must be tested. The main objective of the testing process is to ensure the security of a transaction by encrypting the details of the customer and the merchant.

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

Decoding Flutter Web challenges

0

Flutter is a popular framework for building modern, high-performance multi-platform applications. Developed by Google, Flutter is known for its fast, expressive, and flexible approach to building user interfaces. With Flutter, developers can create beautiful, interactive, and responsive web applications that work across a range of devices and browsers. However, like any new technology, Flutter for the web comes with its challenges. In this article, I’ll decode some of the challenges that developers may face when using Flutter for web development. I’ll also provide some tips and solutions for overcoming these challenges so that you can make the most out of this powerful framework. Whether you’re a seasoned web developer looking to learn more about Flutter, or a newcomer to the world of web development, this article will provide valuable insights into the challenges and rewards of using Flutter for the web.

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:

1. Customizing flutter web app initialization

2. Resource sharing restrictions?

3. Configure URL strategy

4. Plugins & Custom code in JS

5. Conclusion


Customizing flutter web app initialization

Flutter web uses _flutter.loader javascript API. This API can be used to display a loading indicator in CSS and prevent the app from loading based on a condition.

1. The initialization process is broken down into three steps.

  1. Fetches the main.dart.js script and initializes the service worker.
  2. Initializes Flutter’s web engine by downloading required resources such as assets, fonts, and CanvasKit.
  3. Prepares the DOM for your Flutter app and runs it.

https://gist.github.com/Aditsyal/45f003d0cc1ea4a908c95f96ffcac2a4

EntryPoint Initialization

The loadEntrypoint method has the following parameters which can be customized:

  1. entrypointUrl — This points to the URL of our Flutter app’s entrypoint which is defaulted to the main.dart.js file.
  2. serviceWorker —This sets the flutter_service_worker.js configuration file.
  3. serviceWorkerVersion — This takes the service worker version set by the build process in our index.html file.
  4. timeoutMillis — This points to the timeout value for the service worker loader which is defaulted to 4000ms.

Engine Initialization
By default, the Flutter engine is initialized using the initializeEngine() function but we can also call the autoStart() to start the app immediately with the default configuration.

https://gist.github.com/Aditsyal/b3524d851445bb06c1ff1d6c82cb1625

Using these you can customize your Flutter web app initialization to something like,

https://gist.github.com/Aditsyal/5322eee024a97e1c5803e4824a8b71a8

Resource sharing restrictions?

Have you ever come across a situation where your Flutter web app failed to load the images from the web or arbitrary sources on your desktop browsers? Let’s take a scenario, that your Flutter web app displays video thumbnails from youtube but somehow fails to do so and throws you an error, or the network images coming from a different domain throw an error. All these scenarios possibly hint at a single cause, Cross-Origin Resource Sharing (CORS). We’ll talk about CORS ahead but before that let’s understand how things work on the web at Flutter end and why CORS is the reason for your trouble. Flutter web uses two different renderers, each of which has different functionality, advantages, and limitations.

HTML renderer:
HTML renderer is one of the renderers responsible to render your web app on mobile browsers. It uses the HTML <img> element to render images which has certain advantages such as image optimization, memory management, and above all, it allows you to display images from arbitrary sources.

  1. Uses HTML, CSS, Canvas 2D, and SVG to render UI.
  2. Uses <img> and <picture> elements to render images.
  3. Display images from arbitrary sources.
  4. Advantages with browser caching.

But wait. If an HTML renderer can easily display images from arbitrary sources without any extra load then why are we facing issues? You’ll get to know that ahead.

HTML renderer despite having certain advantages does have a few limitations too but the one that matters is that it has limited access to image data i.e no image manipulation, no image pixels data hence limited use.

CanvasKit renderer:
It’s one of the renderers responsible for rendering your UI on desktop browsers and for that purpose it uses WebGL. It uses the HTML <canvas> element to render images and has far better advantages over HTML renderer when it comes to having control of image data which furthermore helps with image sizing, and reading more pixels data, and since it uses WebGL you have superlative control over the image.
To take the advantage of CanvasKit renderer and WebGL you will need to configure CORS for your data.

  1. Uses WebGL to render UI.
  2. Advantages with image sizing.
  3. Custom image algorithms.
  4. Access to image data for manipulation(if CORS configured).

Cross-Origin Resource Sharing i.e CORS
You would have heard this word a lot of times above and might be wondering what it is and why we need to deal with it. Well, it’s a security feature implemented by web browsers that prevent a web page from making requests to a different domain than the one that the page is served from. So basically, when you use <img> <picture> or <canvas> elements, the browser automatically blocks any data regarding pixels if the data is coming from a different domain. Therefore, you need to configure your CORS policy for the domain your images are coming from to be able to let canvaskit renderer works to its ability.

To curb this resource-sharing issue for your Flutter web app there are a few different solutions that you can implement,

Using HTML renderer

As we’ve read, HTML renderer though not the default renderer for Flutter for the web but does allow you to display images from arbitrary sources without any need for extra configurations. So, we can achieve that by forcing our web app to use an HTML renderer despite using the default CanvasKit renderer and we can do that by running the following command on the terminal,

flutter run -d chrome - web-renderer html

Using CORS configuration

Another way is to use your default renderer i.e CanvasKit renderer because using an HTML renderer has limitations that the default renderer solves but to be able to use images from arbitrary sources in CanvasKit renderer you will need to configure your CORS file for the domain you’re fetching the images from.
Below are the steps to configure your CORS file for the Firebase domain, in this scenario I’m assuming that the images are coming from the Firebase storage so we need to set up the CORS for the Firebase to do so follow the below steps,

  1. Download the Google Cloud sdk.
  2. In your Flutter project, create the cors.json file.
  3. In the terminal, navigate to the google-cloud-sdk/bin and run gcloud init.
  4. Authenticate yourself and choose your project.
  5. Run gsutil cors set cors.json gs://<your-bucket-name>.appspot.com where bucket-name is the name of the bucket where images are stored on Firebase storage.

This is how your cors.json file should look like, where I’ve set the origin as “*” which makes it accessible for all domains but you can replace it with your specific domain, for ex: “https://your-example-website.appspot.com”.

[
{
"origin": ["*"],
"method": ["GET"],
"maxAgeSeconds": 3600
}
]

Configure URL strategy

Flutter Web has two URL strategies for its apps

By default, Flutter uses the hash in its web app URLs but that can be a problem considering indexing and SEO-related queries on the web which can be an issue considering one of the critical aspects of the web. This is important because it allows the app to handle different types of URLs consistently and predictably.

For example, the URL strategy can be used to specify how the app should handle deep links, which are URLs that link directly to specific pages or sections within the app. This can make it easier for users to share links to specific parts of the app with other people, and it can also help improve the overall user experience of the app by making it more intuitive and navigable.

  1. Flutter web supports two ways to configure URLs.
    Hash(default): flutterexample.dev/#/path/to/screen.
    Path: flutterexample.dev/path/to/screen.
  2. To use PathUrlStrategy one needs to configure web server rewrites to index.html.
  3. You need to make sure that you include <base href=”/”> inside the <head> section of your web/index.html when using the path URL strategy.

https://gist.github.com/Aditsyal/e084e78dd4e77b335ec9fc93caa5fca2

The flutter_web_plugins library provides this method. The above method changes the URL strategy in your Flutter web app but you also need to handle various situations in the above scenario like handling it for the mobile app which involves a few conditional statements to make the implementation further simpler you can use the below plugin.

Plugin: url_strategy

  1. Use this plugin to simplify the implementation.
  2. It’s based on the previous solution provided by the flutter_web_plugins.
  3. You only need to call a single function.
  4. No need to use conditional imports.

https://gist.github.com/Aditsyal/abbc544db55a5f2d37d310ba635c1f1f

Plugins & Custom code in JS:

If you’ve integrated your existing Flutter code to be compatible with Flutter web then you might’ve come across a situation where the plugins that worked for you earlier might cause problems after the Flutter web integration. Well, this is highly possible as not all your previous plugins might support Flutter web,

Replacing your plugins:
One way is to replace your older plugins with the ones that are compatible with Flutter web, now this may or may not help you but you’ve to explore all the options available to avoid creating a plugin yourself that fits your requirements and also support Flutter web.

Custom native javascript code:
Now, having all plugins replaced or whatever could’ve been replaced you could still be in a situation where you want to get something done on the Flutter web app and there’s no plugin for that or maybe you know to achieve the task you could easily get it done using Javascript, yes you could write a javascript code and integrate it in your Flutter web app using the following steps,

1. Create a js file in the web folder of your project.

2. Write your custom method.

https://gist.github.com/Aditsyal/8f259742abce0fce69db3f49b4ff1ef6

3. Update the index.html file.

<script src="custom.js" defer></script>

4. Use the method in your dart code.

js.context.callMethod(
'customAlertMessage', ['Hey this is custom IS code! ']):

Conclusion:

In conclusion, Flutter for the web is a powerful framework for building modern, high-performance web applications. Despite its relative newcomer status, Flutter has quickly gained popularity among developers for its fast, expressive, and flexible approach to building user interfaces. However, like any new technology, Flutter for the web comes with its challenges. These challenges can range from the relative immaturity of the Flutter ecosystem to the lack of support for certain features and functionality. Despite these challenges, many developers are drawn to Flutter for the web because of its ability to create beautiful, interactive, and responsive web applications quickly and easily. By understanding the challenges and finding solutions to overcome them, developers can take full advantage of the benefits that Flutter for the web has to offer.

Thanks for reading this article.
If I got something wrong? Let me know in the comments. I would love to improve.


From Our Parent Company Aeologic

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

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

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

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire 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.

Retrofit Implementation In Flutter

0

Hello Everyone..!!!! Today we are learning about Retrofit In Flutter. In any mobile application, communication with the server to fetch the data or send the data to the server via API is a basic need in Retrofit.dart is a type conversion dio client generator using source_gen and inspired by Chopper and Retrofit.

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

Add Dependency

Implementation

Conclusion

GitHub Link



Introduction:-

Retrofit is a Dio client that makes consuming Rest APIs easier for us. Build runner is used for code generation in Dart, apart from the pub. JSON Serialization creates a model class from JSON data.

Almost in every Android and IOS, we have to use Rest API and Retrofit is best to arrange the API properly. For fetching the API we can also use many libraries but Retrofit is easy to use and has clean code.


Add Dependency:-

To add the dependency first you have open pubspec.ymal file and then add some dependencies,

cupertino_icons: ^1.0.2
retrofit: ^3.3.1
json_annotation: ^4.7.0

dev_dependencies:
flutter_test:
sdk: flutter
: ^2.3.2
retrofit_generator: ^4.2.0

we add retrofit, json_annotation, build_runner, and retrofit_generator. Retrofit is a dio client generator using source_gen, inspired by Chopper and Retrofit. JSON annotation is used to create code for JSON serialization and deserialization. Build Runner is the build system for Dart code generation and modular compilation. Retrofit Generator is a dio client generator using source_gen, inspired by Chopper and Retrofit.


Implementation:-

Welcome to my blog… Now we start the application, by creating a new flutter application. First, we have to create an abstract API request class.

@RestApi(baseUrl: "http://www.json-generator.com/api/json/get/")
abstract class RestClient {
factory RestClient(Dio dio) = _RestClient;
@GET("/ceLGCumWjS?indent=2")
Future<List<Post>> getTasks();
}

In this, we define baseUrl and then create a Rest-client abstract class in which we create _restclient which is dio type, and then use get because we use get API and call the list of API. RestClient class is responsible for handling all the network call methods. In the above code, it will show an error on the _RestClient variable, which will be resolved with steps we see later on in this post.


@JsonSerializable()
class Post{
int index;
String name;
String picture;
String gender;
int age;
String email;
String phone;
String company;

Post({
this.index,
this.name,
this.picture,
this.gender,
this.age,
this.email,
this.phone,
this.company});

factory Post.fromJson(Map<String, dynamic> json) => _$PostFromJson(json);
Map<String, dynamic> toJson() => _$PostToJson(this);
}

After that, we create our model class in which we pass all the data we want to fetch from the server(API).

After that, we have to run two commands by which we can create the g.dart class:

# dart
dart pub run build_runner build

# flutter
flutter pub run build_runner build

In the home. dart class, we create UI and call the API. In this, we create AppBar, passing the title and title’s style.

AppBar(
backgroundColor: Colors.blue[300],
centerTitle: true,
title: Text(
'Flutter Retrofit',
style: TextStyle(
fontSize: 25, color: Colors.white, fontWeight: FontWeight.bold),
),
),

After that, we create a FutureBuilder type method with the name _buildBody and pass BuildContext in this method. And pass the Post list in the FutureBuilder method. We call the RestClient by creating a client. And return the FutureBuilder.

FutureBuilder<List<Post>> _buildBody(BuildContext context) {
final client = RestClient(Dio(BaseOptions(contentType: "application/json")));
return FutureBuilder<List<Post>>(

future: client.getTasks(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
final List<Post> posts = snapshot.data!;
return _buildPosts(context, posts);
} else {
return Center(
child: CircularProgressIndicator(),
);
}
},
);
}

In this, we also call the _buildPosts method which is List-view. and return the ListView.Builder. In itemCount, we pass the length posts list. And in item builder, we return the Card and fetch the data from API.

ListView _buildPosts(BuildContext context, List<Post> posts) {
return ListView.builder(
itemCount: posts.length,
padding: EdgeInsets.all(8),
itemBuilder: (context, index) {
return Card(
elevation: 4,
child: ListTile(
title: Text(
posts[index].name,
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(posts[index].email),
leading: Column(
children: <Widget>[
Image.network(posts[index].picture,width: 50,height: 50,
),
],

),
),
);
},
);
}

Conclusion:

In this article, we learn how to implement Retrofit in Flutter Application. In this, we learn many things like how to create the model and how to generate g.dart file

❤ 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 RetroFit Application :

GitHub – flutter-devs/retrofit_demo
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.


MultiThreading In Flutter

0

Flutter, the cross-platform developed by google is much in the talk about its splendid User Interface ability and animations. The power of it is hindered if somehow we suffer issues of screen freezing, animations not working as intended, and screen jumping which in turn make the whole user experience negative. Usually, what triggers this phenomenon is either accessing multiple api requests synchronously, image processing, animations, or any other lengthy operations.

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.

A lot of developers want to address this issue in their applications so that such a situation may not arise at all which could be easily done by creating multiple Isolate which are separate threads with their event loop that don’t share a memory with the main isolate (thread) that runs the Flutter app for such tasks. This process is called Multithreading.

Multithreading is a technique by which several processors can use a single code set at different execution stages.

Dart is a single-threaded language: All dart code runs in a single isolate, making them so important that the entirety of dart applications runs in an isolate.

Need for Isolate in Flutter

In Flutter, everything is executed in a single main thread even in the case of async / await thus Multithreading is essential because when working on mobile platforms, some expensive operations within this flow either need to be asynchronous or should run on the background threads. We accomplish this process with the use of Isolates.

Isolates are useful for running code that may take a long time to complete without blocking the main thread, which is important for providing a smooth and responsive user experience. Multithreading allows for parallel execution of two or more parts of a program, which can make the program run faster by taking advantage of the multiple cores or CPUs available on the computer. It can also make the program more responsive to the user by allowing it to perform multiple tasks at the same time.

Isolate explanation by the flutter team

Before deep-diving into the types of isolates there are certain things to keep in mind :

No communication between threads : isolate created possess no communication between each other including the custom object in flutter isolate .

Communication is done with help of ports : Any communication between threads is carried through ports i.e. — SendPort & ReceivePort

Types Of Isolate In Flutter

Isolate in flutter can be created in these 2 ways :

: Computefunction

: Spawnfunction

: spawn function

Creating an isolate using spawn is simple, it requires 2 arguments: a void Function(dynamic) callback, and an optional dynamic message.The callback function represents the entry point of the isolate, and the message argument can be used to pass data to the isolate when it is spawned.

Here’s an example of how you can use Isolate.spawn to create an isolate:

isolate spawn

This will create an isolate and run the isolateFunction callback in the isolate. The main isolate will pass the string “Hello from the main isolate!” as the message argument to the isolate, which will be printed by the isolate’s isolateFunction.

Note that isolates are separate threads of execution, and they do not share a memory. This means that you will need to use inter-isolate communication techniques, such as message passing or shared memory, to pass data between isolates.

Compute function

In Flutter, you can use the compute function to run a function in a separate isolate. The compute function is a convenience wrapper around the Isolate.spawn function that makes it easier to use isolates for compute-intensive tasks.

Here’s an example of how you can use the compute function to create an isolate in Flutter:

isolate compute

In this example, the computeIntensiveFunction is run in a separate isolate using the compute function. The compute function returns a Future that completes with the return value of the function when it is finished. In this case, the computeIntensiveFunction returns the square of the input value, so the result variable will be set to 10000.

Note that the function passed to the compute the function must be a top-level function or a static method, and it must take a single argument of type dynamic and return a value.

How do Isolates Communicate with each other?

To communicate between isolates, you can use a combination of SendPort and ReceivePort objects.

Here’s an example of how you might use these classes to send a message from the main isolate to a new isolate:

To send a message from the new isolate back to the main isolate, you can use the SendPort object that was passed from the main isolate to the new isolate.

Here’s an example of how you might use this SendPort to send a message back to the main isolate:

In the main isolate, you can use a ReceivePort to listen for incoming messages from the new isolate.

Here’s an example of how you might use a ReceivePort to receive a message from the new isolate:

The flutter_isolate the package provides a way to run Dart code in a separate isolate (a separate execution context). Isolates are used to run code concurrently and can be useful for implementing load balancing, as they allow you to distribute workloads across multiple threads.

Here’s an example of how you can use the flutter_isolate package to load balance a workload in a Flutter application:

This example creates a list of three isolates, each running the same workload. You can then distribute the workload across the isolates by calling the run method on each isolate.

You can customize the behavior of the isolates by passing in additional options when creating them. For example, you can specify a custom message handler for the isolate, or configure the isolate to run in a background isolate. Please refer to the flutter_isolate package documentation for more details.

Reference :

flutter_isolate | Flutter Package
A Dart isolate is roughly equivalent to a single, independent execution thread. In a Flutter context, creating…pub.dev


Thanks for reading this article ❤

Clap 👏 If this article helps you.

Feel free to post any queries or corrections you think are required…✔

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.

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!

Configuration Testing With Test Cases In Flutter

0

Hi everyone! today we learn about Configuration Testing with Test Cases In Flutter. Configuration Testing is a software testing technique in which the software application is tested with multiple combinations of software and hardware to evaluate the functional requirements and find out optimal configurations under which the software application works without any defects or flaws.

As discussed above, Configuration Testing is software testing where the application under test has to be tested using multiple combinations of Software and Hardware.

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::

Configuration Testing Example

Pre-requisites for Configuration Testing

Objectives of Configuration Testing

How to do Configuration Testing

Sample Test Cases

Conclusion


Configuration Testing Example:

et’s understand this with an example of a Desktop Application:

Generally, Desktop applications will be of 2-tier or 3-tier, here we will consider a 3-tier Desktop application that is developed using Asp .NET and consists of a Client, Business Logic Server, and Database Server where each component supports the below-mentioned platforms.

  • Client Platform — Windows XP, Window7 OS, windows 8 OS, etc.
  • Server Platform — Windows Server 2008 R2,Windows Server 2008 R2, Windows Server 2012R2
  • Database –SQL Server 2008, SQL Server 2008R2, SQL Server 2012, etc.

A tester has to test the Combination of Client, Server, and Database with combinations of the above-mentioned platforms and database versions to ensure that the application is functioning properly and does not fail.

Configuration testing is not only restricted to Software but also applicable to Hardware which is why it is also referred to as Hardware configuration testing, where we test different hardware devices like Printers, Scanners, Webcams, etc. that support the application under test.

Pre-requisites for Configuration Testing:

For any project before starting with the config test, we have to follow some pre-requisites

  • Creation of a matrix that consists of various combinations of software and hardware configurations
  • Prioritizing the configurations as its difficult to test all the configurations
  • Testing every configuration based on prioritization.

Objectives of Configuration Testing:

The objectives of configuration Testing are to

  • Validating the application to determine if it fulfills the configurability requirements
  • Manually causing failures which help in identifying the defects that are not efficiently found during testing (Ex: changing the regional settings of the system like Time Zone, Language, Date time formats, etc.)
  • Determine an optimal configuration of the application under test.
  • Analyzing the system performance by adding or modifying the hardware resources like Load Balancers, increasing or decrease in memory size, connecting various printer models, etc.
  • Analyzing system Efficiency based on prioritization, how efficiently the tests were performed with the resources available to achieve the optimal system configuration.
  • Verification of the system in a geographically distributed Environment to verify how effectively the system performs.
  • For Ex: With servers at different locations and clients at different locations, the system should work fine irrespective of the system settings.
  • Verifying how easily the bugs are reproducible irrespective of the configuration changes.
  • Ensuring how traceable the application items are by properly documenting and maintaining the easily identifiable versions.
  • Verifying how manageable the application items are throughout the software development life cycle.

How to do Configuration Testing:

In this section, we will discuss the strategy that needs to be followed for configuration testing types there are two types of configuration testing as mentioned below

Software Configuration Testing

Hardware Configuration Testing

  • > Software Configuration Testing:

Software configuration testing is testing the Application under test with multiple OS, different software updates, etc. Software Configuration testing is very time-consuming as it takes time to install and uninstall different software that is used for the testing.

Instead of Installing and uninstalling the software in multiple physical machines which is time-consuming, it’s always better to install the application/software in the virtual machine and continue testing. This process can be performed by having multiple virtual machines, which simplifies the job of a tester

Software configuration testing can typically begin when

  • Configurability requirements to be tested are specified
  • The test environment is ready
  • The testing Team is well-trained in configuration testing
  • Build released is unit and the Integration test passed

The typical Test Strategy that is followed to test the software configuration test is to run the functional test suite across multiple software configurations to verify if the application under test is working as desired without any flaws or errors.

Another strategy is to ensure the system is working fine by manually failing the test cases and verifying efficiency.

Example:

Say there is a Banking Application, which has to be tested for its compatibility across multiple browsers when the application is hosted in an environment where all the prerequisites are present it might pass the unit and Integration Testing in the test lab.

But if the same application is installed in a client place and the machines are missing some software updates or the versions on which the application is dependent directly or indirectly there is a chance that the application might fail. To avoid this kind of situation, it’s always suggested to fail the tests manually by removing some of the reconfigurability requirements and then proceed with the testing.

  • > Hardware Configuration Testing:

Hardware configuration testing is generally performed in labs, where we find physical machines with different hardware attached to them.

Whenever a build is released, the software has to be installed in all the physical machines where the hardware is attached, and the test suite has to be run on each machine to ensure that the application is working fine.

To perform the above task a significant amount of effort is required to install the software on each machine, attach the hardware, and manually run or even automate the above-said process and run the test suite.

Also, while performing hardware configuration tests, we specify the type of hardware to be tested, and there are a lot of computer hardware and peripherals which make it quite impossible to run all of them. So it becomes the duty of the tester to analyze what hardware is mostly used by users and try to make the testing based on prioritization.

Sample Test Cases:

Consider a Banking Scenario to test for hardware compatibility. A Banking Application that is connected to Note Counting Machine has to be tested with different models like Rolex, Strob, Maxsell, Stok, etc.

Let’s take some sample test cases to test the Note Counting Machine

  • Verifying the connection of the application with the Rolex model when the prerequisites are NOT installed
  • Verifying the connection of the application with the Rolex model when the prerequisites are installed
  • Verify if the system is counting the notes correctly
  • Verify if the system is counting the notes incorrectly
  • Verifying the tampered notes
  • Verifying the response times
  • Verifying if the fake notes are detected and so on

The above test cases are for one model, and the same has to be tested with all the models available in the market by setting them up in a difficult test lab. Hence, it is advisable to outsource the hardware configuration testing to organizations that specialize in them.

Conclusion:

In Software Engineering, Configuration Testing should be given equal importance as other testing types. Without configuration testing being performed, it is difficult to analyze the optimal system performance, and also software might encounter compatibility issues that are supposed to run.

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

NFC In Flutter

0

This blog will explore the NFC in Flutter. We will perceive how to execute a demo program in your flutter applications. Near-field communication — NFC is something that has eased up our lives in many ways. Let’s get through it in brief.

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 NFC?

NDEF

Flutter with NFC

What is an NFC tag?

What is an NFC reader?

Platform Setup

Code Implement

Conclusion

Github Link



What is NFC?

NFC (near-field communication), is a short-range(depending on hardware, usually around 3 cm–5 cm) wireless technology that allows your phone to act as a transit pass or a credit card, speedily transfer data, or instantly connect with Bluetooth devices like headphones or speakers.

NFC is not some entirely new technology. It’s simply an evolved form of RFID (radio frequency identification) technology that has already been used around for decades. If you’ve ever used a key card (punch card) to access an office building or hotel room, you already know how it works.

NFC is based on RFID technology but has a much lower transmission range.

NFC only has a maximum range of a few centimeters, at most. And in so many smartphone-related applications, you’ll find that the software will only initiate communication if there is some physical contact. This is to prevent accidental triggers — especially the point that the technology is used for transferring sensitive/tactful data.

NDEF:-

NDEF is a Dart library for encoding & decoding NDEF records, supporting multiple types including (grouped by Type Name Format):

-> NFC Well Known:

  • Text
  • Connection handover
  • Smart poster
  • URI with a well-known prefix
  • Digital signature

-> Media (MIME data):

  • Easy Bluetooth pairing / Bluetooth low-energy
  • other MIME data

-> Absolute URI

Flutter with NFC:-

You will find multiple packages in the pub. dev. The one I chose is called nfc_manager and supports Android and iOS. This package is something that is being used very often whenever we need to work with NFC in a flutter.

The project I will present here is based on the counter-example of Flutter with NFC. The good part is you can easily store your current value on a tag and read a value from it. This storage does not need any device or any power source. The tag acts as an enduring memory layer for the app.

What is an NFC tag?

An NFC tag is a small integrated circuit consisting of a copper coil and a few amounts of storage. We can easily read and write data to it only when some other NFC device is brought near to it because it doesn’t contain a power source. The proximity of the NFC device induces its power in the title and that enables data transmission.

What is an NFC reader?

Any powered device which has its own NFC coil (like a tablet, smartphone, etc) can act as an NFC reader. With the help of its battery, the reader device gets able to generate an electromagnetic field, which powers the tags that are brought near it. Also, a basic example of a reader is a payment terminal, which makes use of NFC to authenticate a credit & debit card.

Platform Setup:-

  • Android requires use permission in the app’s main manifest file, as follows:
<uses-permission android:name="android.permission.NFC"/>

iOS Setup :

<key>NFCReaderUsageDescription</key>
<key>com.apple.developer.nfc.readersession.felica.systemcodes</key>

Code Implement:

Let’s get started with the NFC demo project.

Global flag if NFC is available.

bool isNfcAvalible = false;

void main() async {
WidgetsFlutterBinding.ensureInitialized(); // Required for the line below
isNfcAvalible = await NfcManager.instance.isAvailable();
runApp(const MyApp());
}

This is how we write NFC tags.

NfcManager.instance.startSession(onDiscovered: (tag) async {
Ndef? ndef = Ndef.from(tag);

NdefMessage message = NdefMessage([
NdefRecord.createExternal('android.com', 'pkg',
Uint8List.fromList('com.example'.codeUnits))
]);

try {
await ndef!.write(message);
NfcManager.instance.stopSession();
print("Counter witten a tag");
// _alert('Counter written to tag');

return;
} catch (e) {
print('error $e');
return;
}
}),

And this is how we read from the tag.

var ndefMessage = ndef?.cachedMessage!;And this is how we read from the tag.
if (ndefMessage!.records.isNotEmpty &&
ndefMessage.records.first.typeNameFormat ==
NdefTypeNameFormat.nfcWellknown) {
final wellKnownRecord = ndefMessage.records.first;if (wellKnownRecord.payload.first == 0x02) {
final languageCodeAndContentBytes =
wellKnownRecord.payload.skip(1).toList();
final languageCodeAndContentText =
utf8.decode(languageCodeAndContentBytes);
final payload = languageCodeAndContentText.substring(
2);
final storedCounters = int.tryParse(payload);
if (storedCounters != null) {
print("Success!");
print('Counter restored from tag');
}
}

As working with NFC with iOS, we need to stop the session after every tags:-

if (Platform.isIOS) {
NfcManager.instance.stopSession();
}

Conclusion:

In this article, we get to learn how to work with NFC in Flutter Application. This article gives a good understanding of how to read and write to a tag so that one can easily make data transfer.

❤ ❤ 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 NFC Application :

GitHub – flutter-devs/my_nfc_demo
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.