Google search engine
Home Blog Page 65

System Testing in Flutter

0

Hi everyone! today we start learning about system testing in a flutter, System testing is testing conducted on a complete integrated system to evaluate the system’s compliance with its specified requirements. System testing takes, as its input, all of the integrated testings.

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 System Testing?

System Testing is Blackbox

What do you verify in System Testing?

Software Testing Hierarchy

Entry/Exit Criteria

System Test Plan

Procedure To Write System Test Cases

System Test Cases

Different Types of System Testing

What Types of System Testing Should Testers Use?

Advantages of System Testing

Disadvantages of System Testing

Conclusion


What is System Testing?:

System Testing is a level of testing that validates the complete and fully integrated software product. The purpose of a system test is to evaluate the end-to-end system specifications. Usually, the software is only one element of a larger computer-based system. Ultimately, the software is interfaced with other software/hardware systems. System Testing is a series of different tests whose sole purpose is to exercise the full computer-based system.

System Testing is Blackbox:

Two Category of Software Testing

  • Black Box Testing
  • White Box Testing

> System test falls under the black box testing category of software testing.

> White box testing is the testing of the internal workings or code of a software application. In contrast, black box or System Testing is the opposite. System test involves the external workings of the software from the user’s perspective.

What do you verify in System Testing?:

System Testing involves testing the software code for following

  • Testing the fully integrated applications including external peripherals to check how components interact with one another and with the system as a whole. This is also called End to End testing scenario.
  • Verify thorough testing of every input in the application to check for desired outputs.
  • Testing of the user’s experience with the application.

That is a very basic description of what is involved in system testing. You need to build detailed test cases and test suites that test each aspect of the application as seen from the outside without looking at the actual source code.

Software Testing Hierarchy:

As with almost any software engineering process, software testing has a prescribed order in which things should be done. The following is a list of software testing categories arranged in chronological order. These are the steps taken to fully test new software in preparation for marketing it:

  • Unit testing is performed on each module or block of code during development. Unit Testing is normally done by the programmer who writes the code.
  • Integration testing is done before, during, and after the integration of a new module into the main software package. This involves testing each code module. One piece of software can contain several modules which are often created by several different programmers. It is crucial to test each module’s effect on the entire program model.
  • System testing is done by a professional testing agent on the completed software product before it is introduced to the market.
  • Acceptance testing — beta testing of the product done by the actual end-users.

> System Testing Process:

System Testing is performed in the following steps:

  • Test Environment Setup: Create a testing environment for better quality testing.
  • Create Test Case: Generate a test case for the testing process.
  • Create Test Data: Generate the data that is to be tested.
  • Execute Test Case: After the generation of the test case and the test data, test cases are executed.
  • Defect Reporting: Defects in the system are detected.
  • Regression Testing: It is carried out to test the side effects of the testing process.
  • Log Defects: Defects are fixed in this step.
  • Retest: If the test is not successful then again the test is performed.

Entry/Exit Criteria:

Let’s take a detailed look at the Entry/Exit criteria for System Test:

> Entry Criteria:

  • The system should have passed the exit criteria of Integration testing i.e. all the test cases should have been executed and there should be no critical or Priority P1, a P2 bug in an open state.
  • The test Plan for this testing should be approved & signed off.
  • Test cases/scenarios should be ready to be executed.
  • Test scripts should be ready to be executed.
  • All the non–functional requirements should be available and test cases for the same should have been created.
  • The testing environment should be ready.

> Exit Criteria:

  • All the test cases should be executed.
  • No critical Priority or security-related bugs should be in an open state.
  • If any medium or low-priority bugs are in an open state, then they should be implemented with the acceptance of the customer.
  • Exit Report should be submitted.

System Test Plan:

A test plan is a document that is used to describe the purpose, objective, and scope of a product to be developed. What has to be tested and what should not be tested, testing strategies, tools to be used, environment required, and every other detail is documented to proceed further with the testing.

The Test Plan helps to proceed with testing in a very systematic and strategic manner and that helps to avoid any risks or issues while testing is done.

System Test Plan covers the following points:

  • Purpose & Objective is defined for this test.
  • Scope (Features to be tested, Features not to be tested are listed).
  • Test Acceptance Criteria (Criteria on which the system will be accepted i.e. mentioned points in acceptance criteria should be in the pass state).
  • Entry/Exit criteria (Defines the criteria when system testing should start and when it should be considered complete).
  • Test Schedule (Estimation of testing to be completed at a specific time).
  • Test Strategy (Includes testing techniques).
  • Resources (Number of resources required for testing, their roles, resource availability, etc).
  • Test Environment (Operating System, Browser, Platform).
  • Test Cases (List of test cases to be executed).
  • Assumptions (If any assumptions, they should be included in the Test Plan).

Procedure To Write System Test Cases:

System test cases cover all the scenarios & use cases and also cover functional, non-functional, user interface, and security-related test cases. The test cases are written in the same way as they are written for functional testing.

System test cases include the below fields in the template:

  • Test Case ID
  • Test Suite name
  • Description — Describes the test case to be executed.
  • Steps — Step-by-step procedure to describe how to perform testing.
  • Test Data — Dummy data is prepared to test the application.
  • Expected Result — Expected result as per the requirement document is provided in this column.
  • Actual Result — The result after the execution of the test case is provided in this column.
  • Pass/Fail — A comparison of actual & expected results defines the Pass/fail criteria.
  • Remarks

System Test Cases:

Here are some sample test scenarios for an eCommerce Site:

  1. If the site launches properly with all the relevant pages, features, and logo
  2. If the user can register/login to the site
  3. If the user can see products available, he can add products to his cart can do payments, and can get the confirmation via e-mail or SMS, or call.
  4. If the major functionality like searching, filtering, sorting, adding, changing, wishlist, etc work as expected
  5. If the number of users (defined as in the requirement document) can access the site simultaneously
  6. If the site launches properly in all major browsers and their latest versions
  7. If the transactions are being done on the site via a specific user are secure enough
  8. If the site launches properly on all the supported platforms like Windows, Linux, Mobile, etc.
  9. If the user manual/guide return policy, privacy policy, and terms of using the site are available as a separate document and useful to any newbie or first-time user.
  10. If the content of pages is properly aligned, well managed, and without spelling mistakes.
  11. If session timeout is implemented and working as expected
  12. If a user is satisfied after using the site or in other words user does not find it difficult to use the site.

Different Types of System Testing:

There are more than 50 types of System Testing. Below we have listed types of system testing a large software development company would typically use

  1. Usability Testing– mainly focuses on the user’s ease to use the application, flexibility in handling controls, and ability of the system to meet its objectives
  2. Load Testing– is necessary to know that a software solution will perform under real-life loads.
  3. Regression Testing– involves testing done to make sure none of the changes made throughout the development process have caused new bugs. It also makes sure no old bugs appear from the addition of new software modules over time.
  4. Recovery testing — is done to demonstrate a software solution is reliable, trustworthy, and can successfully recoup from possible crashes.
  5. Migration testing- is done to ensure that the software can be moved from older system infrastructures to current system infrastructures without any issues.
  6. Functional Testing — Also known as functional completeness testing, Functional Testing involves trying to think of any possible missing functions. Testers might make a list of additional functionalities that a product could have to improve during functional testing.
  7. Hardware/Software Testing — IBM refers to Hardware/Software testing as “HW/SW Testing”. This is when the tester focuses his/her attention on the interactions between the hardware and software during system testing.

What Types of System Testing Should Testers Use?:

There are over 50 different types of system testing. The specific types used by a tester depend on several variables. Those variables include:

  • Who the tester works for — This is a major factor in determining the types of system testing a tester will use. Methods used by large companies are different than that used by medium and small companies.
  • Time available for testing — Ultimately, all 50 testing types could be used. Time is often what limits us to using only the types that are most relevant for the software project.
  • Resources available to the tester — Of course, some testers will not have the necessary resources to conduct a testing type. For example, if you are a tester working for a large software development firm, you are likely to have expensive automated testing software not available to others.
  • Software Tester’s Education- There is a certain learning curve for each type of software testing available. To use some of the software involved, a tester has to learn how to use it.
  • Testing Budget — Money becomes a factor not just for smaller companies and individual software developers but for large companies as well.

Advantages of System Testing:

  • The testers do not require more knowledge of programming to carry out this testing.
  • It will test the entire product or software so that we will easily detect the errors or defects which cannot be identified during the unit testing and integration testing.
  • The testing environment is similar to that of the real-time production or business environment.
  • It checks the entire functionality of the system with different test scripts and also it covers the technical and business requirements of clients.
  • After this testing, the product will almost cover all the possible bugs or errors and hence the development team will confidently go ahead with acceptance testing.

Disadvantages of System Testing:

  • This testing is a more time-consuming process than another testing technique since it checks the entire product or software.
  • The cost for the testing will be high since it covers the testing of the entire software.
  • It needs a good debugging tool otherwise the hidden errors will not be found.

Conclusion:

System testing is very important and if not done properly critical issues can be faced in the live environment. A system as a whole has different characteristics to be verified.

A simple example would be any website. If it’s not tested as a whole then the user might find that site to be very slow or the site might get crashed once a large number of users log in at the same time.

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


Acceptance Testing In Flutter

0

Hi everyone! today we start learning about Acceptance testing in a flutter, It is formal testing according to user needs, requirements, and business processes conducted to determine whether a system satisfies the acceptance criteria or not and to enable the users, customers, or other authorized entities to determine whether to accept the system or not.

Acceptance Testing is the last phase of software testing performed after System Testing and before making the system available for actual use.

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

Acceptance Testing

Acceptance Testing — In SDLC

Acceptance Criteria

Reason Behind Acceptance Testing in Flutter

Types of Acceptance Testing

Use of Acceptance Testing in Flutter

Steps to Perform Acceptance Testing

Advantages of Acceptance Testing

Disadvantages of Acceptance Testing

Conclusion


Acceptance Testing:

Acceptance testing is formal testing based on user requirements and function processing. It determines whether the software is conforming to specified requirements and user requirements or not. It is conducted as a kind of Black Box testing where the number of required users is involved in testing the acceptance level of the system. It is the fourth and last level of software testing.

User acceptance testing (UAT) is a type of testing, which is done by the customer before accepting the final product. Generally, UAT is done by the customer (domain expert) for their satisfaction and checks whether the application is working according to given business scenarios, and real-time scenarios.

In this, we concentrate only on those features and scenarios which are regularly used by the customer or mostly user scenarios for the business or those scenarios which are used daily by the end-user or the customer.

Acceptance Testing — In SDLC:

The following diagram explains the fitment of acceptance testing in the software development life cycle.

The acceptance test cases are executed against the test data or using an acceptance test script and then the results are compared with the expected ones.

Acceptance Criteria:

Acceptance criteria are defined on the basis of the following attributes

  • Functional Correctness and Completeness
  • Data Integrity
  • Data Conversion
  • Usability
  • Performance
  • Timeliness
  • Confidentiality and Availability
  • Installability and Upgradability
  • Scalability
  • Documentation

Reason Behind Acceptance Testing in Flutter:

Once the software has undergone Unit Testing, Integration Testing, and System Testing so, Acceptance Testing may seem redundant, but it is required due to the following reasons.

  • During the development of a project if there are changes in requirements and they may not be communicated effectively to the development team.
  • Developers develop functions by examining the requirement document on their understanding and may not understand the actual requirements of the client.
  • There may be some minor errors that can be identified only when the system is used by the end-user in the actual scenario, so acceptance testing is essential to discover these minor errors.

Once the application is bug-free, we hand over it to the customer, no customer accepts the application blindly before using it. Hence, they do one round of testing for their satisfaction, which is known as user acceptance testing.

Types of Acceptance Testing:

  • > User Acceptance Testing (UAT):
    User acceptance testing is used to determine whether the product is working for the user correctly. Specific requirements which are quite often used by the customers are primarily picked for the testing purpose. This is also termed as End-User Testing.
  • > Business Acceptance Testing (BAT):
    BAT is used to determine whether the product meets the business goals and purposes or not. BAT mainly focuses on business profits which are quite challenging due to the changing market conditions and new technologies so the current implementation may have to be changed which results in extra budgets.
  • > Contract Acceptance Testing (CAT):
    CAT is a contract that specifies that once the product goes live, within a predetermined period, the acceptance test must be performed and it should pass all the acceptance use cases.
    Here is a contract termed a Service Level Agreement (SLA), which includes the terms where the payment will be made only if the Product services are in-line with all the requirements, which means the contract is fulfilled.
  • > Sometimes, this contract happens before the product goes live. There should be a well-defined contract in terms of the period of testing, areas of testing, conditions on issues encountered at later stages, payments, etc.
  • > Regulations Acceptance Testing (RAT):
    RAT is used to determine whether the product violates the rules and regulations that are defined by the government of the country where it is being released. This may be unintentional but will impact negatively on the business.
  • > Generally, the product or application that is to be released in the market, has to go under RAT, as different countries or regions have different rules and regulations defined by their governing bodies. If any rules and regulations are violated for any country then that country or the specific region the product will not be released in that country or region. If the product is released even though there is a violation then only the vendors of the product will be directly responsible.
  • > Operational Acceptance Testing (OAT):
    OAT is used to determine the operational readiness of the product and is non-functional testing. It mainly includes testing of recovery, compatibility, maintainability, reliability, etc. OAT assures the stability of the product before it is released in production.
  • > Alpha Testing:
    Alpha testing is used to determine the product in the development testing environment by a specialized testers team usually called alpha testers.
  • > Beta Testing:
    Beta testing is used to assess the product by exposing it to the real end-users, usually called beta testers in their environment. Feedback is collected from the users and the defects are fixed. Also, this helps in enhancing the product to give a rich user experience.

Use of Acceptance Testing in Flutter:

  • To find the defects missed during the functional testing phase.
  • How well the product is developed.
  • A product is what the customers need.
  • Feedback help in improving the product performance and user experience.
  • Minimize or eliminate the issues arising from the production.

Steps to Perform Acceptance Testing:

There are steps for perform Acceptance Testing are:

> Requirement Analysis:

In this step, the testing team analyzes the requirement document to find out the objective of the developed software. Test planning is accomplished by using requirement documents, Process Flow Diagrams, System Requirements Specifications, Business Use Cases, Business Requirements Documents, and Project Charter.

> Test Plan Creation:

Test Plan Creation outlines the whole strategy of the testing process. This strategy is used to ensure and verify whether the software is conforming to specified requirements or not.

> Test Case Designing:

This step includes the creation of test cases based on test plan documents. Test cases should be designed in a way that can cover most of the acceptance testing scenarios.

> Test Case Execution:

Test Case Execution includes the execution of test cases by using appropriate input values. The testing team collects input values from the end-user then all test cases are executed by both the tester and end-user to make sure the software is working correctly in the actual scenario.

> Confirmation of objectives:

After successful completion of all testing processes, the testing team confirms that the software application is bug-free and it can be delivered to the client.

Advantages of Acceptance Testing:

  • It increases the satisfaction of clients as they test the application itself.
  • The quality criteria of the software are defined in an early phase so that the tester has already decided on the testing points. It gives a clear view of the testing strategy.
  • The information gathered through acceptance testing is used by stakeholders to better understand the requirements of the targeted audience.
  • It improves requirement definition as the client tests requirement definition according to his needs.

Disadvantages of Acceptance Testing:

According to the testing plan, the customer has to write requirements in their own words and by themselves but

  1. Customers are not willing to do that; it defeats the whole point of acceptance testing.
  2. If test cases are written by someone else, the customer does not understand them, so the tester has to perform the inspections by themselves only.

If the process is done in this manner, it destroys the existence of the Acceptance Testing.

Conclusion:

In Software Engineering, the Full form of UAT is User Acceptance Testing.UAT is one of the many flavors of testing that has emerged over the last twenty-five years. With UAT, the client can be sure of “What to expect” from the product rather than assuming. The benefit of UAT is that there will be no surprises when the product is released to the market.

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


Integration Testing For Testers In Flutter

0

Hi everyone! today we start learning about Integration testing in a flutter, It is the phase in software testing in which individual software modules are combined and tested as a group. Integration testing is conducted to evaluate the compliance of a system or component with specified functional requirements. It occurs after unit testing and before system testing.

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 Integration Testing?

Why do Integration Testing?

Example of Integration Testing

Types of Integration Testing

Sandwich Testing

How to do Integration Testing?

Brief Description of Integration Test Plans

Entry and Exit Criteria of Integration Testing

Conclusion


What is Integration Testing?:

INTEGRATION TESTING is defined as a type of testing where software modules are integrated logically and tested as a group. A typical software project consists of multiple software modules, coded by different programmers. The purpose of this level of testing is to expose defects in the interaction between these software modules when they are integrated

Integration Testing focuses on checking data communication amongst these modules. Hence it is also termed as ‘I & T’ (Integration and Testing), ‘String Testing’, and sometimes ‘Thread Testing’.

Why do Integration Testing?:

Although each software module is unit tested, defects still exist for various reasons like

  • A Module, in general, is designed by an individual software developer whose understanding and programming logic may differ from other programmers. Integration Testing becomes necessary to verify the software modules work in unity
  • At the time of module development, there are wide chances of change in requirements by the clients. These new requirements may not be unit tested and hence system integration Testing becomes necessary.
  • Interfaces of the software modules with the database could be erroneous
  • External Hardware interfaces, if any, could be erroneous
  • Inadequate exception handling could cause issues.

Example of Integration Testing:

Let us assume that we have a Gmail application where we perform the integration testing.

First, we will do functional testing on the login page, which includes the various components such as username, password, submit, and cancel buttons. Then only we can perform integration testing.

The different integration scenarios are as follows:

> Scenarios1:

  • First, we log in as P users and click on the Compose mail, and perform the functional testing for the specific components.
  • Now we click on the Send and also check for Save Drafts.
  • After that, we send a mail to Q and verify in the Sent Items folder of P to check if the send mail is there.
  • Now, we will log out as P and login as Q and move to the Inbox, and verify if the mail has reached.

> Secanrios2: We also perform the integration testing on Spam folders. If the particular contact has been marked as spam, then any mail sent by that user should go to the spam folder and not in the inbox.

Note: We will perform functional testing for all features, such as to send items, inbox, and so on.

As we can see in the below image, we will perform functional testing for all the text fields and every feature. Then we will perform integration testing for the related functions. We first test the add user, list of users, delete user, edit user, and then search user.

Note:

  • There are some features, we might be performing only the functional testing, and there are some features where we are performing both functional and integration testing based on the feature’s requirements.
  • Prioritizing is essential, and we should perform it at all the phases, which means we will open the application and select which feature needs to be tested first. Then go to that feature and choose which component must be tested first. Go to those components and determine what values to be entered first.
    And don’t apply the same rule everywhere because testing logic varies from feature to feature.
  • While performing testing, we should test one feature entirely and then only proceed to another function.
  • Among the two features, we must be performing only positive integrating testing or both positive and negative integration testing, and this also depends on the features needed.

Types of Integration Testing:

Integration testing can be classified into two parts:

  • Incremental integration testing
  • Non-incremental integration testing

> Incremental Testing:

In the Incremental Testing approach, testing is done by integrating two or more modules that are logically related to each other and then testing for the proper functioning of the application. Then the other related modules are integrated incrementally and the process continues until all the logically related modules are integrated and tested successfully.

1) Bottom-up Integration Testing: It is a strategy in which the lower-level modules are tested first. These tested modules are then further used to facilitate the testing of higher-level modules. The process continues until all modules at the top level are tested. Once the lower-level modules are tested and integrated, then the next level of modules is formed.

Diagrammatic Representation:

Advantages:

  • Fault localization is easier.
  • No time is wasted waiting for all modules to be developed unlike the Big-bang approach

Disadvantages:

  • Critical modules (at the top level of software architecture) which control the flow of applications are tested last and may be prone to defects.
  • An early prototype is not possible

2) Top-down Integration Testing: It is a method in which integration testing takes place from top to bottom following the control flow of the software system. The higher-level modules are tested first and then lower-level modules are tested and integrated to check the software functionality. Stubs are used for testing if some modules are not ready.

Diagrammatic Representation:

Advantages:

  • Fault Localization is easier.
  • Possibility to obtain an early prototype.
  • Critical Modules are tested on priority; major design flaws could be found and fixed first.

Disadvantages:

  • Needs many Stubs.
  • Modules at a lower level are tested inadequately.

Sandwich Testing:

Sandwich Testing is a strategy in which top-level modules are tested with lower-level modules at the same time lower modules are integrated with top modules and tested as a system. It is a combination of Top-down and Bottom-up approaches therefore it is called Hybrid Integration Testing. It makes use of both stubs as well as drivers.

How to do Integration Testing?:

The Integration test procedure irrespective of the Software testing strategies (discussed above):

  1. Prepare the Integration Tests Plan
  2. Design the Test Scenarios, Cases, and Scripts.
  3. Executing the test Cases followed by reporting the defects.
  4. Tracking & re-testing the defects.
  5. Steps 3 and 4 are repeated until the completion of Integration is successful.

Brief Description of Integration Test Plans:

It includes the following attributes:

  • Methods/Approaches to testing (as discussed above).
  • Scopes and Out of Scopes Items of Integration Testing.
  • Roles and Responsibilities.
  • Pre-requisites for Integration testing.
  • Testing environment.
  • Risk and Mitigation Plans.

Entry and Exit Criteria of Integration Testing:

Entry and Exit Criteria to Integration testing phase in any software development model

Entry Criteria:

  • Unit Tested Components/Modules
  • All High prioritized bugs were fixed and closed
  • All Modules to be code completed and integrated successfully.
  • Integration tests Plan, test case, scenarios to be signed off and documented.
  • Required Test Environment to be set up for Integration testing

Exit Criteria:

  • Successful Testing of Integrated Application.
  • Executed Test Cases are documented
  • All High prioritized bugs were fixed and closed
  • Technical documents to be submitted followed by release Notes.

Conclusion

This is all about Integration testing and its implementation in both the White box and Black box techniques. Hope we explained it clearly with relevant examples.

Test Integration is an important part of the testing cycle as it makes it easier to find the defect when two or more modules are integrated to integrate all the modules all together in the first step itself.

It helps in finding the defects at an early stage which in turn saves the effort and cost as well. It ensures that the integrated modules work properly as expected.

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


Focusable Action Detector In Flutter

0

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

In Flutter, to build any application, we start with widgets. The construction block of flutter applications. Widgets portray what their view should look like given their current setup and state. It consolidates a text widget, line widget, segment widget, container widget, and some more.

While building a custom UI control in Flutter it’s enticing to simply utilize a GestureDetector and tap out, yet to do so would be a mix-up! Particularly assuming you’re anticipating supporting clients with alternate inputs like a mouse or keyboard.

In this article, we will explore the Focusable Action Detector. We will implement the Focusable action detector demo program and learn how to use the same in your flutter applications.

FocusableActionDetector class – widgets library – Dart API
API docs for the FocusableActionDetector class from the widgets library, for the Dart programming language.api.flutter.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::

Focusable Action Detector:

Constructor

Properties

Code Implement

Code File

Conclusion

GitHub Link


Incidentally, making a UI control that acts “appropriately” for different input sources is a lot more confounded than simply detecting taps. Generally, the control you make needs the accompanying features:

  • > a hover state
  • > a focus state (for tab-key or arrow-key traversal)
  • > a region that changes the mouse-cursor
  • > key handlers for [Space] and [Enter] keys (or maybe others)

Focusable Action Detector:

FocusableActionDetectorcombinesFocus,Actions,Shortcuts andMouseRegioninto one, and is used pretty heavily inside of the Flutter SDK, including the Material DatePicker,Switch,Checkbox,RadioandSlider controls.

Customarily, you could make that by making a significant block out of widgets including Focus, Actions, Shortcuts, and MouseRegion. This works, however, is a ton of boilerplate, and space. Fortunately, Flutter gives a committed widget for this purpose: FocusableActionDetector.

Demo Module :

This demo shows how the detector works in an app. It shows how the buttons are having focus and hover changes and mouse changing regions.

Constructor:

To utilize Focusable Action Detector, you need to call the constructor underneath:

FocusableActionDetector({
Key key,
bool enabled = true,
bool autofocus = false,
FocusNode? focusNode,
bool descendantsAreFocusable = true
,bool descendantsAreTraversable = true
,Map<ShortcutActivator, Intent>? shortcuts,
Map<Type, Action<Intent>>? actions,
ValueChanged<bool>? onShowFocusHighlight,
ValueChanged<bool>? onShowHoverHighlight,
ValueChanged<bool>? onFocusChange,
MouseCursor mouseCursor = MouseCursor.defer,
@required Widget child,
});

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

Properties:

There are some properties of FocusableActionDetector:

  • > actions → Map<Type, Action<Intent>>?A map of Intent keys to Action<Intent> objects that defines which actions this widget knows about.
  • > autofocus → bool True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
  • > child → Widget The child widget for this FocusableActionDetector widget.
  • > descendantsAreFocusable → bool If false, will make this widget’s descendants unfocusable.
  • > descendantsAreTraversable → bool If false, will make this widget’s descendants untraversable.
  • > enabled → boolIs this widget enabled or not.
  • > focus Node → FocusNode?An optional focus node to use as the focus node for this widget.
  • > mouse Cursor → MouseCursorThe cursor for a mouse pointer when it enters or is hovering over the widget.
  • > onFocus Change → ValueChanged<bool>?A function that will be called when the focus changes.
  • > onShowFocusHighlight → ValueChanged<bool>?A function that will be called when the focus highlight should be shown or hidden.
  • > onShowHoverHighlight → ValueChanged<bool>?A function that will be called when the hover highlight should be shown or hidden.
  • > shortcuts → Map<ShortcutActivator, Intent>?The map of shortcuts that the ShortcutManager will be given to manage.

How to implement code in dart file:

You need to implement it in your code respectively:

Create a new dart file calledbutton.dart inside thelib folder.

To start with, make a StatefulWidget that can hold your _isFocused and _isHovered state. We’ll likewise make a FocusNode that we can use to demand focus on press, which is a typical way of behaving for buttons. Likewise, make some run of the mill onPressed and label fields to design the button.

class MyCustomButton extends StatefulWidget {
@override
State<MyCustomButton> createState() => _MyCustomButtonState();
}

class _MyCustomButtonState extends State<MyCustomButton> {
bool _isHovered = false;
bool _isFocused = false;
FocusNode _focusNode = FocusNode();

@override
Widget build(BuildContext context) {
// TODO:
}

void _handlePressed() {
_focusNode.requestFocus();
widget.onPressed();
}
}

Because we’re making a button, we’ll add some basic configuration options:

const MyCustomButton({Key? key, 
required this.onPressed, 
required this.label}) : super(key: key);
final VoidCallback onPressed;
final String label;
final Color color1;
final Color color2;

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

All that’s left now, is to fill out the build() method.

Widget build(BuildContext context) {
Color outlineColor = _isFocused ? Colors.black : Colors.transparent;
Color bgColor = _isHovered ? widget.color1 : widget.color2;
return GestureDetector(
onTap: _handlePressed,
child: FocusableActionDetector(
mouseCursor: SystemMouseCursors.click,
onShowFocusHighlight: _handleFocusHighlight,
onShowHoverHighlight: _handleHoveHighlight,
actions: {
ActivateIntent:
CallbackAction<Intent>(onInvoke: (_) => _handlePressed()),
},
shortcuts: const {
SingleActivator(LogicalKeyboardKey.keyZ, control: true):
ActivateIntent(),
},
child: Container(
padding: const EdgeInsets.all(8),
child: Text(widget.label),
decoration: BoxDecoration(
color: bgColor,
border: Border.all(color: outlineColor, width: 2),
),
),
),
);
}

In the above code, note that you still do need to wrap a GestureDetector to detect taps. Additionally, notice how you can change the appearance of your UI, according to the hover/focus state.

keyboard actions:

The final step for any control is Keyboard bindings. By default, most OS controls support [Space] and [Enter] to “submit”. You can do this by wiring up the built-in ActivateIntent in the .actions field:

FocusableActionDetector(
actions: {
ActivateIntent: CallbackAction<Intent>(onInvoke: (_) => _handlePressed()),
},
child: ...
),

You can also add additional key bindings using the .shortcuts parameter. Here we’ll bind yet [Ctrl + Z] to the same ActivateIntent. Now our control will submit on [Enter], [Space] and [Ctrl + Z]!

FocusableActionDetector(
shortcuts: {
SingleActivator(LogicalKeyboardKey.keyZ, control: true): ActivateIntent(),
},
child: ...
),

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

With that, you have a finished control that works exactly as you’d expect on desktop, web, and mobile! keyboard actions

Code File:

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

class MyCustomButton extends StatefulWidget {
const MyCustomButton(
{Key? key,
required this.onPressed,
required this.label,
required this.color1,
required this.color2})
: super(key: key);
final VoidCallback onPressed;
final String label;
final Color color1;
final Color color2;

@override
State<MyCustomButton> createState() => _MyCustomButtonState();
}

class _MyCustomButtonState extends State<MyCustomButton> {
bool _isHovered = false;
bool _isFocused = false;
final FocusNode _focusNode = FocusNode();

void _handleFocusHighlight(bool value) {
setState(() {
_isFocused = value;
});
}

void _handleHoveHighlight(bool value) {
setState(() {
_isHovered = value;
});
}

@override
Widget build(BuildContext context) {
Color outlineColor = _isFocused ? Colors.black : Colors.transparent;
Color bgColor = _isHovered ? widget.color1 : widget.color2;
return GestureDetector(
onTap: _handlePressed,
child: FocusableActionDetector(
mouseCursor: SystemMouseCursors.click,
onShowFocusHighlight: _handleFocusHighlight,
onShowHoverHighlight: _handleHoveHighlight,
actions: {
ActivateIntent:
CallbackAction<Intent>(onInvoke: (_) => _handlePressed()),
},
shortcuts: const {
SingleActivator(LogicalKeyboardKey.keyZ, control: true):
ActivateIntent(),
},
child: Container(
padding: const EdgeInsets.all(8),
child: Text(widget.label),
decoration: BoxDecoration(
color: bgColor,
border: Border.all(color: outlineColor, width: 2),
),
),
),
);
}

void _handlePressed() {
_focusNode.requestFocus();
widget.onPressed();
}
}

Conclusion:

In the article, I have explained the essential construction of the Focusable Action Detector widget in a flutter application; you can alter this code as indicated according to your choice. This was a little prologue to the Focusable Action Detector widget 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 Focusable Action Detector widget in your flutter projects. We showed you what the Focusable Action Detector widget is?, its constructor, and its properties of the Focusable Action Detector widget. We made a demo program for working Focusable Action Detector 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 focusable_action_detector:

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

Implement Obx In Flutter

Flutter is awesome! It’s by far the fastest way to create truly cross-platform apps without compromising beauty, performance, and features. With development experience unlike any other framework, it does tick most of the boxes. However, it’s not perfect. Some things slow down the development from time to time.

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.


Enter GetX!:

GetX is a micro-framework that aims to provide a top-notch development experience by minimizing the boilerplate combined with neat syntax and a simple approach. When developing with GetX, everything feels self-evident and practical. It’s a solid blend of simplicity and power. It’s one of those rare packages that try to do everything and do it.

GetX provides a combination of State Management, Dependency Injection, and Route Management solutions that work great together. But things don’t end here, it provides a ton of utilities that make it easy to implement internationalization, theming, validation, etc.

All of these solutions and utilities are packed in individually compiled containers which give us the freedom to choose what to use and what not to, without compromising performance. However, once you’re using GetX, it’s hard to not use everything this package has to offer because everything works so seamlessly together. And, that’s what I call The GetX Ecosystem.

What’s so special?:

  • Firstly, I love the syntax! Before I used GetX, I couldn’t imagine that things like navigating a route can be made this simple. We don’t need, a builder or anything. Just write Get.to(SomePage()) and that’s it. And that’s just one example.
  • The primary focus is on performance. Normally, we would have to choose which controllers to dispose of and manually dispose of them. With GetX, it’s the opposite. We have to choose which one to keep in the memory as they are disposed of automatically. Saves memory, and lines of code.
  • 100% Decoupling! With GetX, it’s possible to achieve this. Business logic is separated from views, and even dependencies can be separated using something called Bindings.
  • It just works. Working with GetX is quite a satisfying experience. Whenever I’ve to implement a certain feature, there’s always a simpler way to do it with GetX, no matter the use case.
  • It’s well maintained and up-to-date. It can be challenging to keep all your packages updated and in sync with each other. Sometimes, there are breaking changes and things can get nasty. GetX centralizes most of our development needs under one package, so we don’t need to worry about compatibility and maintenance.

Let’s Start:

Photo by Nicolas Hoizey on Unsplash

State Management? State Management!:

State Management is still the hottest topic in Flutter Community. There are tons of choices available and it’s super intimidating for a beginner to choose one. Also, all of them have their pros and cons. So, what’s the best approach? The answer is simple — The one you feel comfortable with. Can GetX be the one? Let’s take a look!

GetMaterialApp:

Step 0: Use GetMaterialApp instead of MaterialApp.

class MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return GetMaterialApp(
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Easy localization'),
);
}
}

Boom! Now you’re officially in the ecosystem.

GetxController:

Controllers are classes where all our business logic goes. All the variables and methods are placed here and can be accessed from the view. While we can just create a simple class for this purpose, GetX provides a class called GetxController which extends DisposableInterface.

This means that our controller will get deleted from memory as soon as the widgets using it are removed from the navigation stack. We don’t have to manually dispose of anything and the memory consumption is reduced, resulting in high performance.

class Controller extends GetxController {
TextEditingController ctrl = TextEditingController();
var buttonName = "edit".obs;
void upDate() {
if (ctrl.text.isNotEmpty) {
buttonName.value = 'Save';
} else {
buttonName.value = 'Edit';
}
}

void goToNexPage() {
if (ctrl.text.isNotEmpty) {
ctrl.clear();
upDate();
Get.to(() => const SecondScreen());
}
}
}

Add .obs to any variable and you make it observable. You’re turning buttonName type String. This means that we can listen to the changes made to buttonName our view using GetX.

We use update() the method inside any method in the controller so that our widgets can listen to the changes made by the method. If you have used the Provider package, it’s just like notifyListeners().

Obx:

This one is a personal favorite. It has the simplest syntax and implementation. All we’ve to do is wrap the widget in Obx(() ⇒ ) and we’re done!

_buildButtonView() {
return GestureDetector(
onTap: ()
{
controller.goToNexPage();
},
child: Container(
height: 67,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(20),
),
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Obx(
() => Text(
controller.buttonName.value,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white, fontSize: 20),
),
),
),
),
);
}

The syntax is shorter than, setState though there’s one extra step here. We need to initialize the Controller to use our variables and methods.

This is how we do it in GetX:

final controller = Get.put(Controller());

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

Release Build Process In Flutter

0

Hi everyone! today I am back with a new topic let’s start learning about the release build process in a flutter, Software Build and Release refers to the specialized subfield of system administration that focuses on the process of building software from source code for (initially) testing and (ultimately) releasing and distributing the software.

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 difference between build and release?

What is Build and Release Management

Overview

Create an Xcode Archive

Compare Build Configuration Settings

Disconnect the Debugger

Test a Fresh Install and App Update

Run the App on Various Devices and OS Versions:

Check File System Access

Ensure Network Compatibility

Enable Battery-Saving Modes

Minimize Memory Use

Support User-Defined Input

Test Regions and Languages

Conclusion



What is the difference between build and release?:

A “build” is given by the dev team to the test team. A “release” is the formal release of the product to its customers.

A build when tested and certified by the test team is given to the customers as a “release”. A “build” can be rejected by the test team if any of the tests fail or it does not meet certain requirements. One release can have several builds associated with it.

What is Build and Release Management:

Build and release management is the process of managing, planning, scheduling, and controlling a software build throughout its lifecycle.

Building an application or software includes different stages. Each build has different build numbers and it is constantly worked from a source code storehouse like git. Building an application or programming requires assembling apparatuses like a subterranean insect, expert, Gradle, and so forth. Assemble instruments incorporate the source code records into reusable executable documents or bundles.

Build and Release the executives will control the existing pattern of a product item, the most common way of arranging, making due, planning, and controlling the form in various stages and conditions like the turn of events, testing, organizing, and creation stages.

There are 5 types of environments in build and release infrastructure :

  • DEV — The development team keeps up with this climate to compose their code. Just the development team has access to this environment. QA or different groups don’t approach this environment. Dev group uses this environment, for the most part, to write unit test cases.
  • QA — QA environment is owned by the testing group and the real testing happens in this environment. The DEV group doesn’t approach the QA environment. After coding is finished, the code is moved from DEV to the QA environment for test execution.
  • UAT — User Acceptance Test environment is used by business users to conduct testing after system testing has been completed. In this phase, the product is tested from the business point of view. UAT environment access is restricted only to the business users and on some occasions, temporary access will be provided to the QA team if in case of business users need assistance.
  • STAGING — The STAGING environment exactly resembles the production environment. The application installed in the staging environment should match closely with the production environment.
  • PROD — The PROD environment is the production environment that is accessed by real users and none of the DEV and QA teams have access to this environment.

Overview:

To ensure your app works in deployment, test your release build in a variety of conditions before submitting the app or app update for review, or distributing to Enterprise users. To catch commonly occurring errors or edge-case situations that might not occur during development, consider the differences between development-environment debug builds and user-environment release builds, shown below.

An app may behave differently on a particular user’s device for a variety of reasons. Different devices and operating system versions offer varying software features, and app updates involve data migrations, keychain access, or default data that are not present in a fresh app installation. Disabled features, frame throttling, or other delays may result in limited device power, system memory, or network availability. Xcode allows development and release build settings to diverge, and disables watchdog timeouts.

Create an Xcode Archive:

To test the specific states of your application client’s insight, make a delivery fabricate. In your Xcode undertaking’s plan supervisor, set the run objective to a device and change the chronicle errand to the Release configuration.

Then, choose the Archive option in Xcode’s Product menu. After the archive builds, the Organizer displays.

Xcode saves app archives on disk so you can refer to a particular build later, for example, to submit the build to App Review after the app passes beta tests. The archives’ distribution workflow offers several ways to test the app:

  • TestFlight — TestFlight automates app distribution and submission to reduce the chances of submitting the wrong build to App Review. To distribute an app archive through TestFlight, choose the archive pane’s App Store Connect option.
  • Ad Hoc — To distribute your app to testers manually, for example, by emailing them an .ipa file, choose the archive pane’s Ad Hoc option.
  • Enterprise — Enterprise distribution is similar to Ad Hoc distribution except that you choose the Enterprise option from the Archive pane. Xcode looks for a different code signing identity for Enterprise app distribution that contains a valid Enterprise distribution certificate.
  • Development — The development distribution method signs the release build with your development credentials. This option enables testing if you lack access to team distribution identities. The debugger can attach to a development-signed release build, but be aware that it can mask watchdog timeouts.

For all distribution methods except TestFlight, choose the following options to enhance your chances of discovering a bug that manifests only in the release build:

  • Set App Thinning to “All compatible device variants”.
  • Check “Rebuild from Bitcode”.

You can access an app archive after distribution to debug a user-reported error. If the issue didn’t surface in beta tests, refer to crash logs and app logging to track down the cause; To attempt to reproduce the issue, check the build version in the crash log, and test a release build from an app archive with a matching version.

Compare Build Configuration Settings:

The Xcode project’s Build Settings support various qualities in light of the dynamic form design. The default build configuration are Debug and Release, which the venture plot guides to the Run errand and Archive task, individually. Since the chronicle task makes the delivery construct, the delivery fabricate can act uniquely in contrast to the form that designers run in the debugger as it connects with fabricate settings.

By default, most build settings match the two configurations. To check for differences, inspect the target’s build settings thoroughly. When a setting varies across configurations, Xcode displays <Multiple values>. To see each value, expand the setting’s disclosure triangle.

To ensure the app’s behavior differs across build configurations as intended, take a moment to consider the full implications of each difference, per setting. In the figure above, the app defines a different Info.plist for the release build.

Disconnect the Debugger:

When Xcode launches an app, it enables a debugger that creates some differences from what users experience:

  • The Xcode debugger disables watchdog terminations, which can prevent testers from observing a hang issue while running the app in Xcode. The easiest way to check for watchdog terminations is to disconnect the device from the development machine and launch the app from the home screen.
  • Xcode’s debugger prevents apps from being suspended, so launch your app from the home screen to test background processes. For example, NSURLSession implements a background session, but when the app runs in the Xcode debugger, the background session never runs.

Test a Fresh Install and App Update:

Xcode enhances application building and establishment during improvement by refreshing applications steadily. Thusly, as your application’s code changes during improvement, outdated put away information made by an earlier form might wait except if you cleanse the earlier establishment totally. Despite the fact that the application may never again make old information, admittance to it might cause the application to act contrastingly during testing than what clients experience. To forestall this transient reliance, eliminate the application during improvement to guarantee that Xcode introduces a new form. At the point when you eliminate the application, decide to likewise eliminate the application’s earlier information.

There are two exceptions:

  • The system preserves App Group data on the device as long as the app in the group is installed. To remove potentially obsolete test data from an App Group container, remove all apps that share the group.
  • The system preserves an app’s keychain data on the device even after you delete the app. To clear the keychain, use secItemDelete(_:). If you create a separate utility that removes keychain data, the utility and the app need to share the same application identifier.

If the release build updates a previous version of your app, some users may have the prior version on their device. When your app update aims to support data created by the prior version, test the app update to prevent any regressions. For example, if the updated app changes a file format, or migrates prior data, test the app-update scenario to ensure that the new app properly handles prior app data.

Run the App on Various Devices and OS Versions:

An error may surface only on a particular device, OS version, or a particular combination of the two. To ensure a consistent user experience, test on a wide array of devices and OS versions your app supports.

When diagnosing user-reported issues, pay attention to the user’s device and OS version. See Hardware Model and OS Version in Examining the Fields in a Crash Report. To reproduce a user-reported issue, maintain a robust suite of test devices that vary in device model and OS version. Although it’s possible to run a release build in the Simulator, consider the Simulator a separate device that users don’t use. As such, always test release builds on an actual device.

Check File System Access:

On macOS, users can have different levels of file system access depending on their user account privilege. One way to test the difference that a user’s account privilege makes in your app is to run the app as a guest user. The file system privileges of a guest user fall under the everyone category in Finder’s Get Info pane. By default, the file system access level everyone differs from the default admin access level.

Ensure Network Compatibility:

Debug builds typically run in an isolated network during development, whereas release builds access to varying networks that service your app’s users. Your app can exhibit a problem in one particular network and not another, for example, due to network congestion or network type, such as IPv6 versus IPv4.

  • If developers and beta testers run the app in an IPv4 network, be sure to also test an IPv6 connection to catch any potential issues related to DNS64 or NAT64.
  • To simulate slow or unreliable internet connections on iOS, you can use the Network Link Conditioner. Enable this feature with the Settings app > Developer > Network Link Conditioner option.
  • To debug high-level HTTP issues, run your release build with an HTTP debugging proxy. For low-level issues, like a TCP connection or DNS failure, examine network-level activity for causes.
  • To debug lost network connections, ensure that network connections reach their destination with no breakdowns along the way by reviewing your server-side logs. For private networks, consider potential blockages due to firewall configuration, network proxies, or load balancers.

Some network errors are unavoidable, for example, during server or network downtime. Ensure that your app provides clear user instructions on what to do when the network doesn’t function as expected.

Enable Battery-Saving Modes:

Devices can behave differently based on battery level, the amount of time passed since fully charged, or whether the device battery is charging. For example, Core Location enables an app to request a desired accuracy but it may perform less accurately than your app requests depending on the device battery level. Alternatively, if a concurrent app or system process requests a high accuracy, Core Location might provide a higher accuracy than requested, which may consume the device battery faster. To observe an app error that might result from a lower battery level, or lower Core Location accuracy than your app expects, test under either battery-saving mode:

  • On macOS, run the app on a Macbook unplugged from the power source.
  • On iOS or iPadOS, enable Low Power Mode in Settings > Battery.

To ensure the device is in Low Power Mode, check that the battery indicator is yellow.

Minimize Memory Use:

A user’s device may have less memory available at runtime than testers do either because of varying hardware specifications or the number of apps the device runs concurrently. To simulate an array of user environments, testers need to vary the amount of memory available to your app. One way to limit available memory is to open other apps. On macOS, you can observe memory statistics using Activity Monitor. The difference between the Physical Memory and Memory Used values equals the system’s available memory.

Apps that crash due to memory depletion generate a different kind of crash report, called a jetsam event report.

The volatile nature of memory availability makes it difficult to judge the likelihood of a jetsam event in your app. A good strategy to guard against runtime memory depletion is to proactively minimize your app’s memory requirements using Instruments or MetricKit.

Support User-Defined Input:

Because of the wide range of variation in user-supplied data, apps that support opening users’ files need to anticipate uncommon scenarios, like corrupt or excessively large data. To ensure a good user experience, test bad and unsupported files.

Test Regions and Languages:

The Region user preference setting determines the format of the dates that the OS provides to your app. When a user changes their Region, the system changes the format of every NSDate it supplies to your app. If your app processes dates or times test every language that your app supports to ensure your app can handle all of the possible date formats.

Conclusion:

There is a distinct difference between Build and Release although these two words are often used interchangeably. The main difference between Build and Release in Software Testing is that Build is a version of the software the development team hands over to the testing team for testing purposes while Release is the software the testing team hands over to the customer.

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


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.