Google search engine
Home Blog Page 43

Dough Package For Smooshy UI Flutter

In Flutter there are different ways to design beautiful UI’s but what makes it User Friendly is its Responsiveness, Smoothness, and Squishiness. This Dough package provides this squishiness to your app where you design your app smooshy to gain user attention and make it smoothy to use.

Dough package provides different features in its package like dragging, pressable and you can also pause its shape when you are dragging or pressing any widget.

Why we need this?

Though there are numerous ways to make UI interactive and feature-rich, as a user every one wants new experiences. However, functionality is important in App but when as a user you find the same UI experiences you get kind of bored.

So as service providers we need to make our app functionality-rich as well as attractive. This Dough package is compatible with changes like for features you can override its features and behaviors according to your need.

Explanation

In its explanation part, we will just go through all kind of dough widgets which can fit into your existing widget and will make your widgets squishy smooth and draggable, in this package you get the kind of slow animation feel. So let’s have a look

Pressable Dough

PressableDough(
child: FloatingActionButton( ... ),
);

in Pressable Dough, you only need to wrap your widget with it as you can see in the below example we have used the DoughRecipe widget, in this widget, there are three options data, child, and key. In data, you can provide its viscosity and expansion value.

final doughWidget = DoughRecipe(
data: DoughRecipeData(
viscosity: 3000,
expansion: 1.025,
),
child: PressableDough(
child: centerContainer,
onReleased: (details) {
// This callback is raised when the user release their
// hold on the pressable dough.
print('I was released with ${details.delta} delta!');
},
),
);

https://gist.github.com/shivanchalaeologic/1c0b1e0ed8a414e5e364004e222a31c5#file-pressable_dough-dart

Draggable Dough

It allows you to drag and drop your widget when you drag your widget it shows its squishy nature.

DraggableDough<String>(
data: 'My data',
child: Container( ... ),
feedback: Container( ... ),
);

for example, you can see in the below code

https://gist.github.com/shivanchalaeologic/c7b234e156a81d50db37994a519b77ae#file-draggable_dough-dart

DraggableDough works like the Flutter draggable widget, and the only extra feature is it’s squishy! So you can just use the already built drag widgets that

Custom Dough Widget

If You want to customize your own widget you can do that by using native Dough widgets, Customization does not require any specific implementation.

You only need to just provide values according to your requirement.

DoughRecipe(
data: DoughRecipeData(
adhesion: 4,
viscosity: 250, // a more jello like substance
usePerspectiveWarp: true, // use for added jiggly-ness
perspectiveWarpDepth: 0.02,
exitDuration: Duration(milliseconds: 600),
...
),
child: PressableDough( ... ),
);

https://gist.github.com/shivanchalaeologic/350c6cd79790083b90da032be844a2ff#file-custom_drag-dart

Conclusion

Dough package is easy to use and implement its methods for beautiful UI representation are best in some contexts however it is still improving there will some new changes and improvements when it comes to the modification of the new feature, yet it is easy to use of beautification of UI.

dough | Flutter Package
This package provides some widgets you can use to create a smooshy UI. This package provides squishy widgets you can…pub.dev


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

If this article has helped you a bit and found interesting please clap!👏


From Our Parent Company Aeologic

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

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

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

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

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

Android vs. iOS User behavior: How Does it Impact Mobile App Development?

0

The use of Smartphones has increased at an exponential rate across the modern world. Mobile applications have become an imperative part of mobile devices. A majority of the population of the contemporary world is making use of several mobile apps for their everyday functions; mobile app development is considered a very critical process.

Amid myriad mobile apps that are built and deployed, only a selected few succeed in gaining popularity with users and sustaining their repetitive visits. It is those apps that solve specific problems of users and offer the appropriate solution to the unique needs of users with a seamless user experience that finally succeeds. To be able to come up with such winning apps, developers and entrepreneurs need to understand user behavior analytics and the information gathered from it.

Significance of User Behaviour

What is inevitable in building and delivering a successful app is to understand details such as who the target user of a conceived app is and their preferences and requirements. Developing mobile apps is not like creating a piece of software. In order to come up with successful apps, you need to focus first on what problems of the users are you going to solve with your app. To be able to provide the solution, you must understand the target population at a granular level.

Users’ behavior and personality traits play a vital role in developing a mobile app that attracts and retains users. One way of discerning these factors is by checking the users’ choice of their Smartphone. The choice of the platform among the two major players, namely, iOS and Android which are different in several ways, speaks a lot about users’ specific interests and behaviors. This choice indicates important factors such as whether users are concerned about pricing, whether they take interest in downloading if they are prepared to pay a price for the app, whether they are loyal to some specific brand or not.

User Behaviour Factors That Impact Mobile App Development

Users’ preferences and behavior are representative of their idea about the mobile device as well as applications. By running user behavior analytics in a professional manner, developers and mobile app development companies may arrive at the right decision about choosing their app development platform.

User Preference

While building a mobile app, entrepreneurs and mobile app developers need to consider and understand clearly the interests and choices of users. It is to be noted here that iOS and Android have to be used for targeting entirely different groups of users. While iOS is for users who can spend money easily to buy apps, Android is meant for people in the lower-middle-income group. If acquiring a customer base is your agenda, you need to go in for Android while for revenue generation, iOS is the best bet.

The Role Played by Device Capabilities

Smartphone users view their devices in a personal way. The difference in operating systems has a direct bearing on the user experience. This is one factor that influences the choice of a particular OS by users. Apple’s iOS has stringent regulations for push notifications, timeframe for system updates, and app submissions. In the case of Android, the submission of apps may be performed freely and in a customizable manner.

User’s Spending Tendency

Although the once large gap in consumer spends between Android and iOS users is witnessed to have become smaller, iPhone users are still making more purchases when compared to Android users. While iOS provides opportunities for generating revenue through paid apps, Android apps are seen to draw revenue from mobile advertising.

App Engagement and Retention

One of the key factors that impact the success of the mobile app, is considering the app engagement and retention while planning to build the app. It is common that iOS users are more likely to be engaged with apps and they also usually have higher retention. Android users being not so consistent with app engagement, developers have to face the challenge of building apps that enhance retention rate.

User Demographics

It is well known that Android has more market share than iOS. Good user experience under affordable pricing is the main reason for this. Users’ preferences and spending habits play a vital role in deciding which platform to make use of. Income and location are a few crucial factors that need to be considered while creating a mobile app.

Android Vs iOS App Development: Capabilities

Each OS comes with different capabilities that could impact your final product. Consider how the OS differs for the end-user to build the best possible app on the best possible platform.

Latest Version

Both iOS and Android have grown up into dashingly-handsome operating systems with a lot to offer. Here’s what the latest versions have to offer:

iOS 13 Key Features

  • Dark Mode
  • Better Photo App
  • Improved Portrait Mode
  • CarPlay
  • Siri Update
  • 3d Maps
  • Performance boost

Android 10 Key Features

  • Live Caption
  • Smart Reply
  • Better Gesture Navigation
  • Focus Mode
  • Dark Theme
  • More Privacy Controls
  • Immediate Security Updates
  • Family Control

Customizability

One of the most noticeable differences between iOS and Android is customizability. Apple keeps things simple: you use what we allow you to. Users can customize wallpaper, but that’s about it. Even the default browser is locked into Safari: third-party browsers are forced to use the Safari rendering engine, which makes them slower.

Android, on the other hand, lets users customize just about anything and makes the device feel much more personal to the user as they can customize it according to their preferences. Users can change their SMS Client, edit their lock screen, or even add a custom ROM. As a result, Android gives you a lot more room to build a customizable experience for your user.

Security

Apple devices have developed a reputation for security. While iOS is hardly virus-proof, it remains remarkably secure. The big difference is that iOS is much more closed off than Android. While Android is entirely open-source, Apple’s source code is hidden. Since iOS is a closed system, security threats are pretty rare.

Android, on the other hand, lags behind in security. Even though Google releases security updates every month, device manufacturers tend to push updates a bit late. As a result, many Android devices run a slightly-outdated version of the OS. In the event of a major security update, this lag can be a big security issue.

The Verdict

As long as the web world exists, Android and iOS platforms for mobile app development will always be dominant. Though brands are constantly looking out for mobile applications that can be developed and deployed on both Android and iOS mobile devices, operating constraints, time and costs make developers and software companies choose a platform that suits one better than the other. Which justifies the immense popularity of cross-platform mobile applications in technologies like Flutter, React Native, etc.

An efficient app development process must consider the needs of users and their problems at ground level and perform diligent user behavior analytics to be able to provide the perfect solution to users.

The best decision would be to consider both platforms that can help you achieve a wider customer base. But if constraints are prevalent, a clear understanding of both platforms is a must for improved business value. In this case, the above-featured factors can help you choose the most suitable platform.


From Our Parent Company Aeologic

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

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

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

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

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

How to Reduce The Mobile Application Development Cost

0

The competition in the app market is too high for you to compromise with the quality of your app. There are a plethora of high-quality apps that are built every year and still remain unnoticed. But with high quality comes high costs and when we say high costs, we mean it. This may be a reason why most people avoid app development altogether — which, in turn, does more harm than benefiting.

The world is going mobile rapidly so it becomes important to make your place in the same world. Businesses have doubled their revenues and sales with the help of their mobile app. So, when you see it from a birds-eye view of the long term benefits, these initial investments seem quite worth it.

However, mobile app development costs can still be high for startups since the capital is limited and there is not much to offer. But that shouldn’t stop any startup from reaping the benefits of having an app, right? For the same, we figured out some great strategies to help you reduce app development costs.

There are many ways to cut the cost of your mobile app development without compromising the quality of the app. Let’s have a deeper dive into the various factors that significantly influence mobile app development costs.

It’s All About the Requirements

The first and foremost tip is, make sure to write clear and in-detail requirements about your app development project. By writing a detailed document, you can clearly communicate about your requirements with the app developer that will save their time and effort. So put your thoughts of the app together in an organized yet elaborated manner.

Let’s take an example of our client, who wanted to develop a Women Safety application. Our client contacted us and shared the document, containing requirements about the project. Our client was very clear about his concept, so our business representative instantly understood the concept. In fact, our professional app developers did not face any challenge while developing this app and completed this project in a tight budget and time constraint.

So, if you yourself don’t have a requirement document, that just means you are not clear what you want in the app, which will lead to numerous changes in the app, resulting in an increase in the development time and cost. Make sure to gather your requirements and note down those requirements in the document so that the development team or company gets a clear picture in mind.

A product requirement document, also called a PRD, is a highly-structured list of your app features as well as the projected tech stack. Here are some key PRD components:

  • Project objectives and product idea
  • Company background
  • Timelines
  • App features
  • Platforms
  • UX and UI design (or requirements for it)
  • Project execution milestones and control points

Outsource Or In-House

Hiring dedicated developers and outsourcing the project to them remains a favorite cost-saving strategy of both large- and medium-scale enterprises.

Mobile app development outsourcing will save money for you in the long run. Your project will be managed by experienced developers, and the overall quality will be superior. It gives you various options & you can choose the best suited for your project. You can either go for a fixed budget, or you can also go for an hourly basis payment model.

If you compare this with the cost of hiring an in-house team of developers, it will cost you much less. You can’t ignore in-house expenses such as electricity bills, internet bills, and other utilities other than fixed salaries.

Choose Cross-Platform Development

There are two approaches to creating apps in mobile development — native applications for each specific platform and cross-platform applications that are supported by all modern OS.

Native Applications are considered the most expensive to build from an investor’s standpoint. The clear reason being writing code separately for each operating system, Android & iOS. Whereas in the cross-platform application development process, a single code is written for application to run on multiple operating systems.

Less Development Time equals Less Development Cost.

If you are building your first mobile app, and don’t know where to start, you can take a look at this article.

A Complete Guide to Build Your First Mobile App
Imagine, you woke up one fine day and you have an idea of an amazing app that can bring revolutionary changes, and you…medium.com

Start With MVP

MVP (Minimal Viable Product) can be simply defined as the most basic version of the app that solves the problem. MVP holds a massive prominence in the app industry, especially among startups that are looking to validate their ideas in the market.

It is one of the quickest and most utilized approaches for businesses around the world to validate their idea. Employing an MVP to test their idea into the market is a tremendous quickstep to avoid potential disappointment.

But how will it reduce the cost? Well, something that I can tell you being a part of an app development company is that the more features and functionalities you add in your application, the greater will be the resources that will go behind its development, which means the cost will be greater. MVPs are undoubtedly the best bet for any startup.

What this means is that rather than developing a full-fledged app, the cost of MVP will certainly be less than half.

Keep it Simple!

You must analyze practically the features of your application and the real purpose of creating an app. If you do not need it, do not go! It’s that simple!

When we talk about the overall design of the app, you need to be pretty sure that it should not be cumbersome so that user participation becomes a challenge. So; on your side, you need to do a little analysis of the real needs of the users so that you can project big by little.

The design of the application must be simple but attractive to maximize the number of downloads. Keep UI/UX Simple — One of the strategies to reduce app development costs is to go for simple yet elegant designs. A good UI/UX design is essential, especially for new users since adaptation becomes easy.

Now let’s understand how FlutterDevs as a Mobile App Development Company helps our client reduce their development cost without compromising on the quality even a bit.

This Is How FlutterDevs Operate: Our Process

Once you have an idea for implementation, the most important factor is to check it’s Technical and Economical feasibility.

In technical feasibility analysis, your concepts will be analyzed by our technical experts to check if it technically possible or if it has some challenges.

In economical feasibility, the project is analyzed for its budget. A lot of times the complexity of the project can increase the budget which should be kept in consideration and the client should know about this.

At FlutterDevs, our expert team members Do Free Technical and Economical Feasibility Interactions, so that the client knows about the product before investing their money.

Final Words

Despite the fact that professional app creation isn’t cheap, by following our advice, you can reduce the cost of mobile app development without losing the quality of the final product. You can do a lot of cost-cutting in various ways. But, the most important factor which will control all the above factors in selecting the right mobile app development team. Your app efficiency can be optimized and you can get a fully tested high performing app from the day-0.


From Our Parent Company Aeologic

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

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

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

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

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

Building a Secured Flutter Application

0

Demo of Application ::

Demo.gif

Introduction

In this blog, we shall learn how to build a secured app that doesn’t allow screenshots, video recording of the app. Also when the user exits the app temporarily he has to pass local auth i.e. fingerprint to access the app content.

Safety and privacy of the user’s data have become very important, also very frequently we hide our phone when we are dialing any private content eg. Bank Details, messages, etc to protect our content from the nearby people. We can now close our app temporarily and next time anyone opens it he won’t be able to access ore content neither he can take screenshots and record video.


Table of content

Dependencies used

Setting up our project

Local Auth

Securing application

Github Link


Dependencies used::

We shall use secure_application package to implement the functionality of “no screenshots”, “no video recording”, “prevent unauthorized access”.

secure_application | Flutter Package
This plugin allows you to protect your application content from view on-demand Plugin in iOS is in swift Plugin in…pub.dev

To prevent unauthorized access we shall use the local_auth package to provide a gateway to get the access the app content as many times the user closes the app temporarily.

local_auth | Flutter Package
This Flutter plugin provides a means to perform local, on-device authentication of the user. This means referring to…pub.dev

Note: secure_application proves us a blur screen to prevent unauthorized access and we will use local_auth logic to pass the authentication. You will understand better while we will build logic.

Setting up our project::

Edit your Android Manifest file.

<uses-permission android:name="android.permission.USE_FINGERPRINT"/>

import:

import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:secure_application/secure_application.dart';

Local Auth ::

Go Through the Local Authentication Blog or you can just copy source code to get started —

Local Authentication in Flutter
Local Authentication in Fluttermedium.com

Securing Your Application ::

import ‘package:secure_application/secure_application.dart’;

provides us SecureApplication, SecureGate class to protect our application. SecureGate is used inside SecureApplication.

class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return SecureApplication(
child: SecureGate(
),
);
}
}

SecureGate takes a child, lockedBuilder to pass the widget that will be displayed on the screen and widget that will be displayed at the time of authentication respectively.

lockedBuilder display a blur screen and it takes a widget that will use to pass our fingerprint logic using a button.

lockedBuilder: (context, secureNotifier) => Center(
child: FlatButton(
color: Colors.cyan,
child: Text(
'UNLOCK WITH FINGERPRINT',
style: TextStyle(color: Colors.white),
),
onPressed: () async {
//local auth logic
authenticated
? secureNotifier.authSuccess(unlock: true)
: print("fail");
     //local auth logic start
},
),
),

Most important part is the last line logic i.e.

authenticated
? secureNotifier.authSuccess(unlock: true)
: print("fail");

authenticated returns true if local auth is successful and false if it fails. secureNotifier is a SecureApplicationController and authSucesss() method confirms the auth is successful or not.

SecureApplicationProvider provides us various methods to control the app state. If the app is not secured then HomePage() will be returned and if it is not secured then the fingerprint authentication screen will be displayed.

This logic of child will work for the first time when the user will open the app. After that user will log in through fingerprint and during that the app will be secured through SecureApplicationProvider.of(context).secure() .

authenticated ? SecureApplicationProvider.of(context).secure()
: print("fail");

The above logic will set the app secure only if the local auth is successful.

child: Builder(builder: (context) {
return ValueListenableBuilder<SecureApplicationState>(
valueListenable: SecureApplicationProvider.of(context),
builder: (context, state, _) => state.secured
? MaterialApp(home: HomePage())
: Scaffold(
body: Center(
child: RaisedButton(
onPressed: () async {
//local auth logic
                 authenticated
? SecureApplicationProvider.of(context).secure()
: print("fail");
},
color: Colors.cyan,
child: Text(
'UNLOCK WITH FINGERPRINT',
style: TextStyle(color: Colors.white),
),
),
),
),
);
}),

HomePage and NewPage ::

class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Secure App demo"),
),
body: Center(
child: RaisedButton(
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) {
return NewPage();
}));
},
child: Text("Test on new page"),
),
),
);
}
}

class NewPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("New PAGE")),
body: Center(child: Text("Hello")),
);
}
}

Main Dart File ::

https://gist.github.com/anmolseth06/083670bbf3bce03283d364cd34148b4d#file-main-dart

Github Link ::

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

If you find anything that could be improved please let me know, I would love to improve.💙

If this article has helped you a bit and found interesting please clap!👏


From Our Parent Company Aeologic

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

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

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

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

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

Things to do for App Engagement and User Retention

0

Simply put — mobile app engagement is providing your users with a reason to keep coming back to your mobile app or open your mobile app and perform the desired action. You must create an engagement strategy that boasts high-quality communication.

As well as this, you must use the data, analytics, and insights from your users to help you to learn which part of your app engagement strategy is working the best.

App engagement is all about putting the user needs first. There’s no quick fix. It involves defining your essential app KPIs. Then creating an app communication strategy that is relevant to your mobile audience.

What are the most common metrics and KPIs?

Active Users

This is a crucial metric for app developers, and it’s kind of the going currency in the world of apps. This metric will help you to understand how useful and important your app is by identifying how many users come back to your app.

This can be done on a daily basis or on a monthly basis. Both are, but daily active users is a sign of a genuinely engaging app.

Retention Rate

This metric tells you, as an app developer, what percentage of customers are coming back to your app. On the flip side, you’ll be able to see how many users you are letting go of.

The periods that you are comparing will be dependant on the insights that you want. Should you compare MAUs to last month’s active users, or should you compare it to the previous year?

With retention rate calculations, it’s essential to look at the metric you are measuring. For some apps, it will make more sense to measure logins rather than only app usage.

Session Length

This metric is the amount of time that a user spends in your app each time they open it. This is an excellent indicator of app engagement as time spends in each app is one of the key ways to tell how useful your app is to a user.

Depending on your app, it might make sense to focus on this metric rather than DAUs.

Push Notifications

Push notifications are one of the most effective ways to engage your app users. But, if misused, they are one of the quickest methods to app deletion. The truth is that many mobile apps seeking to engage their users fall into the second category.

So how often should you send push notifications to your users?

With push notifications, it’s about providing the most value to your app audience. If your mobile users are getting value from your app, then they are going to be more engaged.

That sounds obvious, yet so many app engagement strategies fail to consider it. There are so many push notification services that claim that quantity is key to boosting engagement. But, this will very quickly have a negative effect if you don’t consider personalization and relevancy in your push notification strategy.

It’s also vital to understand push notification statistics when trying to engage your audience.

So, let’s look at how you can engage your mobile app users by building a push notification strategy.

Think about your App Experience

A note on personalization — ultimately, your app engagement metrics will improve if you place personalization at the heart of your app engagement strategy.

This means that you need to think of the user at every point in the user journey. If you want to take your app engagement to new heights, then you’ll have to personalize the user experience, clearly define your app’s KPIs and learn how your users want to engage with your app.

But that’s only the first part. How do you keep learning what your app users are engaging with and what elements of your strategy in performing best? Well, that leads me nicely onto…

Regularly upgrade the UI

Once you start seeing your mobile app as a living thing that, like all living things, needs care and attention to grow and evolve, you’ll start addressing the UI more.

In other words, you’ll regularly update it.

When you upgrade the UI, do it based on the needs of your users. What are their needs? To find out, do what we suggested above — gather feedback.

The more upgrades you carry out, the smoother and easier your app will be to use — and the more your engagement and retention will increase.

However, it is normal to have minor bugs upon launch. But if your app lags, crashes, or has slow load times — these factors are all unacceptable to users and your retention rate and other metrics will suffer.

Let’s Conclude

Think about which app engagement metric is most important to you. Clearly define which aspects of your app engage your users. Place the user first. Think about providing value to your users rather than communicating with them for the sake of it. Use highly personalized notification to engage your users in the best in-app micro-moment. Re-engagement can be the most effective way to improve your app revenue or bottom line. Take a data-centric approach to engagement. Always be ready to hypothesize and learn from your engagement data.

Follow these rules and you’ll be well on your way to creating a mobile app engagement and retention strategy that works for your app.


From Our Parent Company Aeologic

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

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

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

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

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

Music Player Using Flutter

Things that you may likely learn from the Blog :

Before starting the blog let me tell you what you can learn from this blog:-

In this blog, you will learn how to implement a music player into your flutter app.

  • How to fetch the music from external storage, play from assets file , how to play the music using a URL(internet).
  • Controlling the volume of the music player.
  • How to pause and play the song.

Demo of App ::

DEMO.gif: {Working gif of module}

Video :

new.mp4
Edit descriptiondrive.google.com


Introduction

Music is a language of emotions. Music apps have become an apparent hit and need of the times. Users are using different music apps to listen up to their favourite songs to help them relieve stress or in Improving their creative ability.

As an app developer, you must make some apps that you can use in your daily life. So I tried to make a personal music app, hoping that you will also like it. In this blog, I will help you to build your basic music app using flutter.😊😊

Table of content::

  1. Packages used
  2. Setting up the project
  3. Playing music using the internet and assets
  4. Fetching music files from our external storage.
  5. Setting up the audio
  6. Creating a Control panel
  7. GitHub Link

Packages used::

We will use flutter_audio_query to fetch the music form our external storage(eg. mobile phone, memory card, etc).

flutter_audio_query | Flutter Package
A Flutter plugin, Android only at this moment, that allows you query for audio metadata info about artists, albums…pub.dev

audio_manager package provides us various methods and functions to implement functionality in our app such as play, pause, seek, inc. or dec. volume.

audio_manager | Flutter Package
A flutter plugin for music playback, including notification handling. This plugin is developed for iOS-based on…pub.dev

Setting up the project::

import the packages

import 'package:flutter_audio_query/flutter_audio_query.dart';
import 'package:audio_manager/audio_manager.dart';

Modify your AndroidManifest.xml

<application
...
android:usesCleartextTraffic="true"
...
>

Modify your build.gradle file.

defaultConfig {
minSdkVersion 23
}

Playing music using internet and assets::

Creating an audio manager instance

var audioManagerInstance = AudioManager.instance;

Playing music using the start method

AudioManager provides us start() method to play the music. It takes a URL, title, description, cover, and auto.

onTap: () {
audioManagerInstance
.start("song URL", "song title",
desc: "description",
auto: true,
cover: "cover URL")
.then((err) {
print(err);
});
},

To play the music file using assets file you just need to change the song URL to assets file path.

onTap: () {
audioManagerInstance
.start("assets/music.mp3"song title",
desc: "description",
auto: true,
cover: "assets/cover.png")
.then((err) {
print(err);
});
},

Fetching music files from our external storage::

To fetch the music files form the external storage we will use a FutureBuilder as FlutterAudioQuery returns a future . This class provides us various methods such as getSongs, getSongsFromArtist , getSongsFromAlbum , getSongsFromArtistAlbum , etc.

To keep the logic simple and sleek we will only use getSongs method. You can use as many as you want.

FutureBuilder(
future: FlutterAudioQuery()
.getSongs(sortType: SongSortType.RECENT_YEAR),
builder: (context, snapshot) {
List<SongInfo> songInfo = snapshot.data;
if (snapshot.hasData) return SongWidget(songList: songInfo);
return Container(
height: MediaQuery.of(context).size.height * 0.4,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircularProgressIndicator(),
SizedBox(
width: 20,
),
Text(
"Loading....",
style: TextStyle(fontWeight: FontWeight.bold),
)
],
),
),
);
},
)

SongWidget

To play the music from the external memory we require a path of that song. SongInfo class provides us filePath property to get the path of the music file.

onTap: () {
audioManagerInstance
.start("file://${song.filePath}", song.title,
desc: song.displayName,
auto: true,
cover: song.albumArtwork)
.then((err) {
print(err);
});
},

https://gist.github.com/anmolseth06/11a33c09b1b4f085494835b1b55bb263#file-songwidget-dart

Setting up the audio::

This is the most important part, because this contolles various events of audio.

void setupAudio() {
audioManagerInstance.onEvents((events, args) {
switch (events) {
case AudioManagerEvents.start:
_slider = 0;
break;
case AudioManagerEvents.seekComplete:
_slider = audioManagerInstance.position.inMilliseconds /
audioManagerInstance.duration.inMilliseconds;
setState(() {});
break;
case AudioManagerEvents.playstatus:
isPlaying = audioManagerInstance.isPlaying;
setState(() {});
break;
case AudioManagerEvents.timeupdate:
_slider = audioManagerInstance.position.inMilliseconds /
audioManagerInstance.duration.inMilliseconds;
audioManagerInstance.updateLrc(args["position"].toString());
setState(() {});
break;
case AudioManagerEvents.ended:
audioManagerInstance.next();
setState(() {});
break;
default:
break;
}
});
}

initializing setupAudio

void initState() {
super.initState();
setupAudio();
}

Creating a control pannel::

This panel has a playpause button, previous button, next button, and a songProgress Slider .

Widget bottomPanel() {
return Column(children: <Widget>[
Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: songProgress(context),
),
Container(
padding: EdgeInsets.symmetric(vertical: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
CircleAvatar(
child: Center(
child: IconButton(
icon: Icon(
Icons.skip_previous,
color: Colors.white,
),
onPressed: () => audioManagerInstance.previous()),
),
backgroundColor: Colors.cyan.withOpacity(0.3),
),
CircleAvatar(
radius: 30,
child: Center(
child: IconButton(
onPressed: () async {
if(audioManagerInstance.isPlaying)
audioManagerInstance.toPause();
audioManagerInstance.playOrPause();
},
padding: const EdgeInsets.all(0.0),
icon: Icon(
audioManagerInstance.isPlaying
? Icons.pause
: Icons.play_arrow,
color: Colors.white,
),
),
),
),
CircleAvatar(
backgroundColor: Colors.cyan.withOpacity(0.3),
child: Center(
child: IconButton(
icon: Icon(
Icons.skip_next,
color: Colors.white,
),
onPressed: () => audioManagerInstance.next()),
),
),
],
),
),
]);
}

Song Duration

This function is used to format the duration of the song this is in millisecond format, we will convert it into this format 00:00 .

Here format is a string 00:00 . _formatDuration takes the duration of the song. If the duration is null then it returns — : — otherwise it returns the duration in the given format.

String _formatDuration(Duration d) {
if (d == null) return "--:--";
int minute = d.inMinutes;
int second = (d.inSeconds > 60) ? (d.inSeconds % 60) : d.inSeconds;
String format = ((minute < 10) ? "0$minute" : "$minute") +
":" +
((second < 10) ? "0$second" : "$second");
return format;
}

SongProgress

Widget songProgress(BuildContext context) {
var style = TextStyle(color: Colors.black);
return Row(
children: <Widget>[
Text(
_formatDuration(audioManagerInstance.position),
style: style,
),
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5),
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
trackHeight: 2,
thumbColor: Colors.blueAccent,
overlayColor: Colors.blue,
thumbShape: RoundSliderThumbShape(
disabledThumbRadius: 5,
enabledThumbRadius: 5,
),
overlayShape: RoundSliderOverlayShape(
overlayRadius: 10,
),
activeTrackColor: Colors.blueAccent,
inactiveTrackColor: Colors.grey,
),
child: Slider(
value: _slider ?? 0,
onChanged: (value) {
setState(() {
_slider = value;
});
},
onChangeEnd: (value) {
if (audioManagerInstance.duration != null) {
Duration msec = Duration(
milliseconds:
(audioManagerInstance.duration.inMilliseconds *
value)
.round());
audioManagerInstance.seekTo(msec);
}
},
)),
),
),
Text(
_formatDuration(audioManagerInstance.duration),
style: style,
),
],
);
}

Github link::

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


If you find anything that could be improved please let me know, I would love to improve.💙

If this article has helped you a bit and found interesting please clap!👏


From Our Parent Company Aeologic

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

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

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

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

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

Native vs Hybrid vs Cross-Platform — What To Choose?

0

With the constantly gaining enthusiasm towards the development of apps for mobile devices, there has been a myriad of questions & lots of confusion over cross-platform vs native vs hybrid app development approaches, particularly from new developers. The lack of enough end-to-end resources for choosing the right mobile app approach has continued to serve as a major barrier to finding a lasting solution for the iOS vs Android banter.

Even so, given that both platforms are critical for a fruitful mobile app strategy, cross-platform mobile app development might seem to be the best answer for this debate. Today it is no longer tenable to simply build an app that targets only one platform —Diversity is the key. We need multi-platform apps that can support both Android and iPhone smartphones and ensure no one is left out.

Native Mobile Apps

A native app is usually written in one programming language for a particular operating system. Compared to other types of products, native apps offer consistent performance and are times more reliable. Depending on the platform an app is developed for, specific programming languages are used. For iOS, it’s mainly Objective-C and Swift, while Android developers write in Java or Kotlin.

Going native is a dream of a lot of app owners, but not all can afford it. The biggest reason is, to run the app on multiple platforms, it requires developing and maintaining an app for each platform separately. And it costs a bomb to develop a Native app for multiple platforms to many business people.

Simply put, Native Apps mean building two different apps with different sets of code for each platform Android & iOS.

More Development Time equals More Development Cost.

Consider Building a Native Application If:

  • Users never used your product before (as a web application, for instance)and this is the first time you are making an app public and you want to impress them with the best experience possible.
  • You want to take advantage of device-specific features — camera, GPS, etc.
  • The app is going to be used by a large number of people or has complex features that would be a nightmare to bugfix is a cross-platform app and impossible to load as a hybrid one
  • You want to get a base of DAUs (Daily Active Users)in order to get VC investors to fund the product, so the app needs to be as intuitive and easy-to-learn as possible

Pros Of Building a Native App

High Speed

Thanks to the fact that native mobile applications don’t have a code that’s too complex, they tend to work faster than other apps. Many app elements are displayed quickly because they are preloaded beforehand.

Works Well Offline

Native apps work with no issues even when there’s no internet connectivity. Obviously, that makes such an application way more convenient to users as they can access all the features on the go or on the airplane when there’s no connection.

Cons Of Building a Native App

No reusable code

If a developer wants to create native apps both for Android and iOS, he would have to develop two separate native apps (just what we discussed). Obviously, that would take a lot more time and effort than developing one cross-platform mobile app with a reusable codebase or a hybrid app with a shared backend code.

Involves More Talent

As native apps are language-specific to the core, companies usually struggle to find a skilled developer to pull off developing a native app back-to-back. When comparing native app vs cross-platform app, if a company wants to reach out to a wider audience, they’d have to hire two development teams for native app development. Whereas it could have gone with just one in the case of cross-platform.

Native App Examples

Most of the apps smartphone users install on a daily basis are native. Here are some of the most prominent examples of what native app development is capable of.

Google Maps

Google Maps is a native app available for both Android and iOS. Both apps have common features — street view, turn-by-turn navigation, public transit information, etc. As a native app, Google Maps is able to profit from the device’s built-in features. While it does need online access to be used to its full performance, Google Maps can be displayed in an offline mode as well.

LinkedIn

LinkedIn is another example of an application that switched from a hybrid to a native app. The quality decrease when it comes to performance, slower rendering speed, and storage space issues due to the increasing amount of daily active users forced LinkedIn to consider native apps as a development vector.

Hybrid Mobile Apps

Hybrid apps are the golden mean between native and web applications. They consist of two parts — backend code and a native viewer that can be downloaded to display the backend in a web view. Unlike web apps, hybrid mobile apps don’t require a browser for access and can take advantage of any plugin and the APIs of a device. They are cheaper in development than native apps but their performance is mostly slower as well.

Consider Building a Hybrid Application If:

  • You want the app to run on different platforms but you don’t have the time to develop a cross-platform solution
  • You want to make use of the device’s native features — camera, GPS, etc.
  • You want to distribute a web application across application stores

Pros Of Building a Hybrid App

Faster Development

Due to the fact that the app uses the same backend code for all platforms, it doesn’t take too much time to create a hybrid app. Basically, all a developer has to do is to create a native shell to view the code that has already been developed as a web app. Keep in mind, however, that hybrid apps with lots of features can be even more time-consuming so it’s better to keep it simple.

Simple Maintenance

Due to the fact that hybrid apps are based on web technology, they are easier to maintain compared to native vs hybrid apps that is more complex in terms of coding.

Cons of Building a Hybrid App

Impossible to access Offline

Due to the fact that hybrid apps are essentially web-based, they don’t work without the Internet connection. Moreover, as all the elements of the app have to be loaded, the performance speed is generally slower. Needless to say, this imposes a ton of connection limitations on the application user. Connection issues are a significant difference between native and hybrid app development.

OS Inconsistencies

Due to the fact that hybrid apps share a codebase, certain features might be supported by Android and not displayed on an iOS device and vice versa. It takes more testing sprints to identify inconsistencies and a ton of modifications to fix these issues.

Hybrid App Examples

While at first glance hybrid apps might seem like nothing but a cheap fix, in reality, a fair share of top social media applications is, in fact, hybrid. Let’s take a look at most popular hybrid app examples:

Gmail

Gmail is the most popular email provider in the world at the moment. It has been a web HTML-application for a long time. Gmail’s mobile application is a powerful combination of the native web-application infrastructure and native application.

The hybrid application for Gmail is just as solid in its performance as its PC version. The high customization level and dozens of features prove that hybrid application can be just as rewarding as a native one in the long run.

Instagram

Using the hybrid development approach allowed developers to create an app that supports rich media. While the Instagram feed can’t be refreshed when there’s no Internet connection, you can still access data that has been loaded already.

As of now, Instagram has over a billion downloads. This proves the convenience and power of hybrid apps.

Cross-Platform Mobile Apps

There are distinct operating systems running on various smartphones with Android and iOS featuring as the most widely used. Each of these platforms utilizes a distinctive programming environment with its own language and API.

As such, the need by mobile developers to reach the largest possible user-base, regardless of their preferred platform has given rise to more value being seen in a cross-platform mobile app. Tools like Xamarin have made cross-platform app development widely popular and accessible.

Why a Cross-Platform App?

Applications created utilizing a cross-platform framework are free from OS impulses and thus offer multi-platform usefulness. They provide an incredible solution when you need to release a mobile app on different platforms at a low cost or constrained budget in terms of money, time, and effort.

Pros of Building a Cross-Platform App

Cost-Effective

The issue of native app vs cross-platform apps can be debated but when it comes to cost efficiency, cross-platform development beats the latter hands down. In addition to most cross-platform development tools being unreservedly available, the approach further spares the cost of having to contract separate developers to create apps for different platforms.

Reusable

With cross-platform apps, developers no longer have to write unique code for each operating system. They can instead use a common codebase to transfer the code to different platforms.

Cons of Building a Cross-Platform App

Complex Development Pross

It takes a skilled developer to create an application that would be well-adapted to a few platforms. Basically, there’s a need to keep all the little differences between operating systems and the hardware they run on especially when it comes to implementing a complex interface and features.

Challenging Integrations

Developers can experience difficulties while integrating cross-platform applications to local settings and engaging a third-party cloud service provider. The code of an HTML5 cross-platform app is complicated as the result of callback-style programming used to communicate with native plugins.

Cross-Platform App Examples

There are dozens of cross-platform apps that we use every day. They prove the efficiency of cross-platform development as well as the benefit from creating products for a few platforms with tools like React or Nativescript simultaneously.

Facebook

Back in 2012, Mark Zuckerberg stated at a TechCrunch Disrupt conference: “The biggest mistake we’ve made as a company is betting on HTML5 over native.” He noted that the experience of maintaining a native app on iOS has proven to be faster in the long run and more liberating than the hybrid approach the company used before. Hybrid apps are known to be quite slow for users, and, as a high-traffic application, Facebook needed to provide as fast and seamless of an experience as possible. That’s why the company has shifted from HTML to React Native — a framework designed to create native Android and iOS apps.

Skype

Skype has been around for quite a while now — it is widely used across various devices and operating systems. In fact, a famous communication tool is a cross-platform app developed with Electron. On a PC scale, it shares a codebase between Windows and Linux. When it comes to smartphones, Skype has a cross-platform iOS/Android app.

The user experience of Skype doesn’t suffer from system limitations or a complex codebase. In fact, last year, the development team completely redesigned the app to make sure it looks native-alike.

Slack

Slack is proof that a cross-platform app can still have a ‘native’ feel to it. Apart from simplifying the group communication process, Slack enables access to bots and can help operate various day-to-day work tasks.

Over the span of just a few years, the platform has become everyone’s favorite collaboration service. If they would have had to choose one operating system, Slack would’ve lost a huge chunk of its audience and would never have arrived at its current peak.

What’s Best For You?

So who comes out as a winner in cross-platform vs native vs hybrid app development? When comparing the three options, there are still advantages and challenges to overcome for each specific development approach. Choosing the right one for you is determined by the talent you have available, the budget, and the time constraints.

Flutter — An Innovative App Building Approach

Flutter is Google’s open-source technology that enables the use of a single codebase for the creation of native Android and iOS apps. Rather than being a framework, it is a complete SDK (software development kit) that contains everything you require for cross-platform mobile app development.

Flutter is the only cross-platform framework that provides reactive views without requiring JavaScript Bridge. Moreover, flutter has been enormously popular with its impeccable User Experience with a sea full of flutter-based apps out there. One of the major use cases of Flutter is Google’s Adword app. A few other examples are Alibaba, a Chinese multinational E-commerce giant, Reflectly, Watermaniac, Tencent, Birch, and many more.

Some Amazing Stats About Flutter

According to Google Trends, Flutter is the second most leading language, followed by React Native for developing cross-platform mobile apps in 2020.

Source: https://trends.google.com/trends/explore?cat=31&date=all&q=React%20Native,Flutter,NativeScript,Xamarin

According to a Stackoverflow survey, Flutter is the third most loved frameworks, libraries and tools followed by .Net Core and Torch.

Source: https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-other-frameworks-libraries-and-tools

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. Team FlutterDevs has been building remarkable mobile apps in Native, Hybrid, and Cross-platform over a decade now. Hire a flutter developer for your 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.

Multi-Language Translator In Flutter

Flutter is well known for its compatibility among other mobile development platforms that why it is one of the most readily growing platforms, and the main reason behind it is the Flutter has come up with every feature and functionality which is required to develop a fully-fledged app. As you know an app is called best app if the user of it does need to access another resource to get its task done and flutter is here to meet all parameters

In this article, we are going to discuss a small technique for Multilanguage translation there are different packages available in the pub.dev and we are going to discuss one of them.

We would implement a technique for translator using this package :

translator | Dart Package
Free Google Translate API for Dart See it in pub: https://pub.dartlang.org/packages/translator and GitHub…pub.dev

You may be in the dilemma that if there is a localization available then why we need to use another package for language translation so the answer is

A free and unlimited Google Translate API for Dart.

You can use it for translate strings and text for educational purpose.

if you need to change a small no of things then it is best to do so instead of using a heavy localization package.

Implementation

First, we need to add this package in pubspec.yaml file.

translator:

then you need to import in the file you are writing your code

import ‘package:translator/translator.dart’;

then you need to create an instance of it

GoogleTranslator translator = GoogleTranslator();

now we need to understand how can we translate our input, Using translate method passing the args from and to designates the language from the text you’re typing and the language to be translated

translator.translate("I love Brazil!", from: 'en', to: 'pt').then((s) {
print(s);
});

or you can omit from language and it’ll auto-detect the language of the source text

translator.translate("Hello", to: 'es').then(print);

also, pass the value to a var using await

var translation = await translator.translate("I would buy a car, if I had money.", from: 'en', to: 'it');
print(translation);
// prints Vorrei comprare una macchina, se avessi i soldi.

The returned value is a Translation an object which holds the translation stuff

var translation = await translator.translate('Translation', from: 'en', to: 'es');
print('${translation.source} (${translation.sourceLanguage}) == ${translation.text} (${translation.targetLanguage})');
// prints Translation (English) == Traducción (Spanish)

You can use the extension method directly on the string too

print(await "example".translate(to: 'pt'));
// prints exemplo

There is a translate and print method that prints directly

translator.translateAndPrint("This means 'testing' in chinese", to: 'zh-cn');
// prints 这意味着用中文'测试
'

now we will use a method to translate given input

here in the given above example, you can see translator.translate is being used to translate the text, it only requires your input and the language in which you want to convert your input.

https://gist.github.com/shivanchalaeologic/a1c44b4957f3a56aaa014b747085efd7#file-multi_lang_translator-dart

As in the above example, you can see that a map of languages is being used to translate every time when the user selects specific language that translator methods execute.

As you can see in this above video it is translating this word in available languages.

Conclusion

This blog is about especially translating things to a small extent as it is best for educational purposes but when it comes to managing the whole app localization is best. However, this package is best if you are required to translate anything quickly on a small scale.


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

If this article has helped you a bit and found interesting please clap!👏


From Our Parent Company Aeologic

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

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

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

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

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

Cache Management in Flutter

0

Introduction

Cache memory is a faster memory storage that stores the data in the memory of the phone locally. It stores the data for a fixed period of time after its data is being cleaned form the memory. We can also use local database techniques such as moor database, SQLite database to store the data but some packages provide us simple methods and functionality to implement cache memory with your app.

In this blog, we will learn how to use cache memory to store the app data, fetch data when needed, delete the data from the memory, delete the entire cache data of the app. Let’s do it…

Demo::


Table of content

  1. Installing dependency
  2. Upload Data in Cache Memory
  3. Fetch data from Cache Memory
  4. Empty cache
  5. Understanding other methods
  6. Github Link

Installing dependency

flutter_cache_manager provides us various methods to perform various operations.

flutter_cache_manager | Flutter Package
A CacheManager to download and cache files in the cache directory of the app. Various settings on how long to keep a…pub.dev

Upload Data in Cache Memory

Initializing file stream

Stream<FileResponse> fileStream = DefaultCacheManager().getFileStream(url);

DefaultCacheManager class provides us getFileStream method to get the stream of the file, it takes the URL to and upload the file inside the cache memory of the device.fileStream returns the stream of FileResponse that stores the information about the file such as file location, time of validity, original URL of the file, source of the file, and file.

Creating a StatelessWidget that returns the stream of FileResponse to display the file

class UploadCacheMemoryData extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("UploadCacheMemoryData");
return StreamBuilder<FileResponse>(
stream: fileStream,
builder: (_, snapshot) {
FileInfo fileInfo = snapshot.data as FileInfo;
return snapshot.hasData
? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.file(fileInfo.file),
Text("Original Url:${fileInfo.originalUrl}"),
Text("Valid Till:${fileInfo.validTill}"),
Text("File address:${fileInfo.file}"),
Text("File source:${fileInfo.source}"),
Text("Hash code:${fileInfo.hashCode}"),
Text("Type:${fileInfo.runtimeType}"),
],
)
: Center(
child: Text("Uploading..."),
);
},
);
}
}
  1. This class returns the stream of FileResponce , builder takes context, and snapshot .snapshot is used to access the file information.
  2. FileInfo fileInfo = snapshot.data as FileInfo; here snapshot data is used FileInfo so that we can access the various methods that provide us information.
  3. For UI we are just displaying the uploaded file on the screen toFileInfo.file provides us the address of the file, to display the file image Image.file() widget is used.

Fetch data from Cache Memory

Initializing the Future

Future<FileInfo> fileInfoFuture = DefaultCacheManager().getFileFromCache(url);

DefaultCacheManager provide us getFileFromCache method to provides the file from the cache memory with the specific URL.

Creating a StatelessWidget that returns the FutureBuilderof FileInfo

DefaultCacheManager().getFileFromCache(url) returns a future that is why we require a FutureBuilder to control fileInfoFuture , the UI part is the same as above.

class FetchCacheMemoryData extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("FetchCacheMemoryData");
return FutureBuilder(
future: fileInfoFuture,
builder: (context, snapshot) {
FileInfo fileInfo = snapshot.data as FileInfo;
return snapshot.hasData
? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.file(fileInfo.file),
Text("Original Url:${fileInfo.originalUrl}"),
Text("Valid Till:${fileInfo.validTill}"),
Text("File address:${fileInfo.file}"),
Text("File source:${fileInfo.source}"),
Text("Hash code:${fileInfo.hashCode}"),
Text("Hash code:${fileInfo.runtimeType}"),
],
)
: Center(child: Text("Fetching..."));
},
);
}
}

Empty cache

DefaultCacheManager provides us emptyCache method delete the entire app cache. In this particular example, we are also setting fileInfoFuture to null . (For better understanding refer full code)

onPressed: () {
DefaultCacheManager().emptyCache();
setState(() {
fileInfoFuture = null;
});
},

Understanding other methods

Refer Usage section

flutter_cache_manager | Flutter Package
A CacheManager to download and cache files in the cache directory of the app. Various settings on how long to keep a…pub.dev

Full code

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

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

class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
actions: [
FlatButton(
onPressed: () {
DefaultCacheManager().emptyCache();
setState(() {
fileInfoFuture = null;
});
},
child: Text("Clear cache"))
],
title: Text("Cache memory demo"),
),
body: fileInfoFuture == null
? UploadCacheMemoryData()
: FetchCacheMemoryData()),
);
}
}

class UploadCacheMemoryData extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("UploadCacheMemoryData");
return StreamBuilder<FileResponse>(
stream: fileStream,
builder: (_, snapshot) {
FileInfo fileInfo = snapshot.data as FileInfo;
return snapshot.hasData
? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.file(fileInfo.file),
Text("Original Url:${fileInfo.originalUrl}"),
Text("Valid Till:${fileInfo.validTill}"),
Text("File address:${fileInfo.file}"),
Text("File source:${fileInfo.source}"),
Text("Hash code:${fileInfo.hashCode}"),
Text("Hash code:${fileInfo.runtimeType}"),
],
)
: Center(
child: Text("Uploading..."),
);
},
);
}
}

class FetchCacheMemoryData extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("FetchCacheMemoryData");
return FutureBuilder(
future: fileInfoFuture,
builder: (context, snapshot) {
FileInfo fileInfo = snapshot.data as FileInfo;
return snapshot.hasData
? Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.file(fileInfo.file),
Text("Original Url:${fileInfo.originalUrl}"),
Text("Valid Till:${fileInfo.validTill}"),
Text("File address:${fileInfo.file}"),
Text("File source:${fileInfo.source}"),
Text("Hash code:${fileInfo.hashCode}"),
Text("Hash code:${fileInfo.runtimeType}"),
],
)
: Center(child: Text("Fetching..."));
},
);
}
}

Stream<FileResponse> fileStream = DefaultCacheManager().getFileStream(url);
Future<FileInfo> fileInfoFuture = DefaultCacheManager().getFileFromCache(url);
const url = 'https://avatars1.githubusercontent.com/u/41328571?s=280&v=4';

Github Link

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


If you find anything that could be improved please let me know, I would love to improve.💙

If this article has helped you a bit and found interesting please clap!👏


From Our Parent Company Aeologic

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

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

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

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

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

The Growth of Flutter Development— 3 Years After The Birth of Alpha

0

The owner of a significant smartphone global market share, China, provides a wide choice of devices for every taste, color, and budget. This significantly makes mobile application technology even more accessible and demanding. Regardless of what your business is — retail, provision of services, or educational activities, today it is next to impossible not to take into account the time that people spend in front of the screens of their mobile devices. That makes the idea of creating the business mobile app for your clients in the coming 2020 year of a great sense.

While there are many ways in which an app can be made using dozens of different technologies and frameworks. And since we all know why cross-platform mobile applications are practically the most suitable for any business.

if not? checkout this article

Native vs Hybrid vs Cross-Platform — What To Choose?
With the constantly gaining enthusiasm towards the development of apps for mobile devices, there has been a myriad of…medium.com

But in this article, we are not going to talk about that. Instead, we’ll talk about the most promising and performing cross-platform mobile development technology — Flutter.

It’s been a little over 3 years when the alpha version of Flutter was released. Since that day, we have seen Flutter as a framework grow into a massive community of millions of people and we will discuss how Flutter became the most loved Framework.

Flutter — A Short Introduction

Flutter is a free and open-source mobile UI framework created by Google and released in May 2017. In a few words, this allows you to create a native mobile application with only one code. It means that you can use one programming language and one codebase to create two different apps (IOS and Android).

Flutter refers to two important things:

  • An SDK (Software Development Kit): A collection of tools that are going to help you to develop your applications. It includes tools to compile your code in native machine code (code for IOS and Android).
  • A Framework (UI Library based on widgets): A collection of reusable UI elements (buttons, text inputs, sliders, etc.) that you can personalize for your personal needs.

To develop with Flutter, you will use a programming language called Dart. It’s also Google’s language created in October 2011 but improved a lot these past years.

Dart focus on front-end development; you can use it to create mobile and web applications.

/media/53767f72df7a0ebd36503a988f06e264

A Brief History of Flutter

Flutter’s beta version was launched on 13th March 2018 and it was first to live on 4th December 2018. In such a short amount of time, Flutter has already established its position in the market. Let’s take a look at the graph below to understand the popularity of Flutter as compared to other mobile platforms.

Now that we know what Flutter is, and why is it so popular among developers and business owners, let’s take a look at some of the greatest apps built with Flutter. People all around the world, have developed thousands of apps with Flutter. It became insanely popular right after it’s alpha launch. Many amazing applications have been build in this framework, but we’ll take a look at the top 6 apps built-in Flutter in the last 3 years.

The Forever Growing Flutter Community

We continue to see fast growth in Flutter usage, with over two million developers having used Flutter in the last 3 years since its release. Despite these unprecedented circumstances, in March there was 10% month-over-month growth, with nearly half a million developers now using Flutter each month.

Some other interesting statistics:

  • 60% of users are developing with Windows, 27% are using macOS, and 13% are using Linux.
  • 35% work for a startup, 26% are enterprise developers, 19% are self-employed, and 7% work for design agencies.
  • 78% of Flutter developers use the stable channel, 11% use beta, and 11% use either dev or master.
  • The top five territories for Flutter are India, China, the United States, the EU, and Brazil.
  • There are approximately 90,000 Flutter apps published in the Play Store, with nearly 10,000 uploaded in the last month alone.

Why is Flutter the best Cross-Platform Technology?

We already know that Flutter is backed by Google and uses Dart programming language. Now, Dart is one of the biggest reasons why developers love Flutter. Dart has Ahead of Time Complied to fast, predictable, native code, which allows Flutter to be written in Dart.

Even though there are a ginormous amount of reasons why Flutter stands out as the best choice for Cross-platform Development, but we’ll try to point out a few. Which are —

High Performance

Flutter allows us to do so much stuff with the apps that are not available on any other platform. Obviously, it will require the framework to be really powerful. In fact, any of the advantages of Flutter wouldn’t be possible without a High-performance cross-platform rendering engine.

Flutter has Skia, their own rendering engine for rendering itself onto the platform provided canvas. Because of this engine UI built in this framework can be launched on virtually any platform.

Lesser Coding

Flutter’s Dart programming language is strongly typed and object-oriented in nature. In Flutter, the programming style is declarative and reactive. Because JavaScript bridge is not necessary for Flutter, the start-up time of the app enhances.

And of course, as Dart programmed flutter framework supports multiple platforms, the written code can be used to support different channels like Mobile, Desktop, and PWA.

Time Tested Efficiency

Flutter has been around enough to showcase concrete proof of its reliance and efficiency. Apps like Google Ads, Reflectly, Alibaba, Hamilton, which we discussed, are the simple portrayal of Flutter’s ridiculous efficiency. These apps with millions of downloads and daily users, generating millions of queries per second, show the reason why these technology giants trusted Flutter with their apps.

Some Amazing Apps Made With Flutter

Flutter Showcase consists of a plethora of applications that are increasing in multiple folds each day with large enterprises trusting flutter for their large userbase apps shows the amount of trust that Flutter offers.

Google Ads (utility) :

Developed by Google using Flutter and it’s available on Android and iOS

Google Ads in an important tool for anyone who is looking to manage and run their ad campaign anywhere on the go. This app helps customers run their ad campaigns so that they can market their services or products and increase their customer base. Featuring a stunning design, this app presents the user with an ocean of information within a tap’s search.

With over 10 Million+ downloads, the app is a beast on its own

Xianyu by Alibaba (eCommerce) :

The Alibaba.com app is a wholesale marketplace for global trade and incorporates Flutter to power parts of the app. The app allows its users to buy products from suppliers around the world, all from the convenience of a mobile app.

Reflectly (Lifestyle):

Reflectly is a personal journal and diary driven by artificial intelligence to enable you to deal with negative thoughts, make positivity louder, and to teach you about the science of well-being. An award-winning mindfulness app built with Flutter. It was featured on the Apple App Store as ‘app of the day’.

Having 1 Million+ downloads with a rating of 4.3 from over 30,000 users.

Birch Finance (Finance):

Birch Finance is a credit card rewards app that helps its users to manage and optimize existing cards. The app enables its users to find the best card for them (according to their spending pattern), tracking spending across all accounts, and offer different ways to earn and redeem rewards.

Hamilton Music (Entertainment):

Flutter empowers the official app of the hit Broadway musical, Hamilton. The app includes exclusive daily news and videos, daily lotteries for New York, Chicago, London, and tour locations, daily trivia game, merchandise store (to purchase items from the official Hamilton store), and more.

Hookle (Social):

Hookle is another app built using Flutter that allows its users to share posts, monitor social activity, and manage multiple social media accounts in one place. Hookle facilitates composing and publishing posts to multiple social media channels, monitor activities across all channels at a glance, customize posts per social media channel, and more.

The Future of Flutter

The increasing rate of adoption of Flutter Framework is telling that more and more mobile developers are switching to Flutter. The continuous effort of the Flutter community to polish the framework is already putting flutter ahead in the race. Over 2 million developers have used Flutter in the last 2 years of its release and it’s constantly growing. In these unprecedented conditions, google saw 10% month over month growth in March, making it nearly a half a million developers using Flutter every month.

With Flutter, the possibilities are practically endless, so even super extensive apps can be created with ease. If you develop mobile apps and have yet to give Flutter a try, I highly recommend you do. After using Flutter since it’s inception, We think its safe to say that it’s the best mobile app development technology and is the future of mobile development. If not, it’s definitely a step in the right direction.

Flutter is a very exciting development in the mobile app space, partly because of Google’s backing, but mainly because of the fresh approach it takes to app development. If you are looking for your app to be free of the shackles of the standard iOS and Android UI elements and you don’t need too many native SDK features, then you are in for a treat as Flutter will give you a great platform for developing fast, great-looking mobile apps.

However, if you are looking for a more conventional-looking mobile app or something that uses more native features, or requires significant 3rd party integrations, then it may be worth waiting a little longer before releasing your company’s first Flutter app.

Our Contribution to the Flutter Community

Flutter was not always the same. We’ve been working on flutter since it’s inception and we’ve seen Flutter and it’s community grow. There were a lot of challenges initially, which were resolved by the community itself.

Like everyone else, we also started from zero. But we’re thrilled to see where we have reached with our dedication and teamwork.

We have bagged 21st Rank worldwide by GitHub awards for our contribution and quality of work. In the last two years of working on Flutter has completely changed the way we see the mobile app development industry. And it never fails to surprise us every day. That is the reason why we as a Mobile App Development Company, majorly develop in Flutter.

Let’s take a look at some of our facts and know where we stand right now:

  • 120+ Open source contribution
  • 10+ Flutter custom Plugins
  • 150+ Blogs
  • 40+ Pre-built Themes
  • More than 25K follower community on social media

Check these links for more Info:


From Our Parent Company Aeologic

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

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

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

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

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