Google search engine
Home Blog Page 22

Explore Generics In Dart & Flutter

0

Flutter code utilizes Dart generics everywhere to guarantee object types are what we anticipate that they should be. Basically, generics are an approach to code a class or capacity so it works with a scope of information types rather than only one while remaining sort-safe. The type the code will work with is indicated by the caller, and along these lines, type safety is kept up.

In this article, we will Explore Generics In Dart & Flutter. We will perceive how to utilize generics collections, classes, and functions in your flutter applications.

Table Of Contents::

Introduction

Generics with Collections

Generics with Asynchronous

Generics in Flutter

Generic Methods & Functions

Generic Classes

Conclusion



Introduction:

Generics are utilized to apply more grounded type checks at the compile time. They implement type-safety in code. For instance, in collections, the type-safety is authorized by holding a similar kind of information. Generics help composes reusable classes, methods/functions for various information types.

Collectionsstreams, and futures are the center library highlights you’ll use with generics frequently as you compose Flutter applications with Dart. It’s a positive routine to exploit generics any place they’re accessible. It’s additionally critical to have the option to believe that information that emerging from prospects or streams has the correct construction, and Dart’s generics include permits you to indicate what that design ought to be.

Generics with Collections:

Collection generics can assist you with being sure every component inside a collection is of the normal kind. You can proclaim collection factors without generics like this:

List myList;
Map myMap;

That code is identical to the accompanying:

List<dynamic> myList;
Map<dynamic, dynamic> myMap;

This ought to possibly be done when you truly need a collection containing a wide range of types. If you know the expected kind of list’s components, you ought to indicate that type inside the angle brackets, which will permit the Dart analyzer to assist you with keeping away from mistakes:

List<String> myList;

Likewise, in the event that you expect for a map to contain keys and values of a specific sort, remember them for the revelation:

Map<String, dynamic> jsonData;
Map<int, String> myMap;

With maps, the primary type inside the angle brackets obliges the map’s keys while the second does likewise for the guide’s qualities. It ought to be noticed that Dart permits you to utilize any sort of map keys, while in certain languages just strings are permitted.

Generics with Asynchronous:

We utilize asynchronous activities to permit an application to stay responsive while trusting that moderately extensive tasks will finish. Instances of tasks that require some time in this manner may be getting information over a network, working with the document framework, or getting to a database. Dart’s essential development supporting asynchronous programs are the Future and the Stream.

It’s a best practice to incorporate kinds when managing futures and streams. This holds them back from returning information of some unacceptable kind. As in different circumstances, if you neglect to incorporate a particular kind, dynamic is expected, and any sort will be permitted.

=> Futures:

It addresses the consequence of asynchronous activity. At the point when at first made, a future is uncompleted. When the activity is finished, what’s to come is finished either with a worth or an error. Utilizing generics, we can indicate the normal type of significant value that is created.

This function returns a Future, yet a bool is at last delivered when the future finishes:

Future<bool> someData() {
return Future.delayed(const Duration(seconds: 2 ), () => true);
}

=> Streams:

They resemble an asynchronous list, or an information pipe, conveying an asynchronous grouping of information. As values become accessible, they are embedded into the stream. Listeners on the stream get the values in a similar request they were embedded.

A typical method to permit a class to communicate with outside code is to utilize a StreamController joined with a Stream. Adding generic sort assignments to these is a decent method to ensure they don’t convey unforeseen outcomes:

final _onData= StreamController<Data>.broadcast();
Stream<Data> get onData => _onData.stream;

This code makes a StreamController that can be utilized to send “Data” objects out on a Stream asynchronously.

Generics in Flutter:

The most widely recognized spots you’ll utilize generics in Flutter are in collections and stateful widgets. Stateful widgets have both a StatefulWidget class and a going with State class. The State class utilizes generics to ensure it manages the StatefulWidget it has a place with, utilizing the syntax structure State<MyApp>. A State case is conventional, composed to work with any StatefulWidget, and for this situation, we’re making a state explicitly for our MyApp class.

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

class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
const Text("Hello, "),
const Text("Flutter Dev's"),
],
);
}
}

If you somehow managed to leave off the angle brackets and the MyApp symbol, the analyzer wouldn’t say anything negative, yet you would have made a State attached to the default dynamic type. In addition to the fact that this is not type-safe, however, it could make issues for the framework as it attempts to coordinate with state cases to the right widgets.

The List strict passed to children for the Row widget is comparatively composed, this time as a list of Widget objects: <Widget>[]. This assignment assists Dart with getting issues at configuration time. If you attempt to put a non-widget into that collection, you will get alerts.

A Row doesn’t have the foggiest idea of how to manage objects that aren’t widgets, so getting this sort of issue before your code runs is helpful. The generics additionally serve to make code that is more self-reporting, clarifying what’s generally anticipated inside the collection.

Generic Methods & Functions:

Dart upholds the utilization of generics on methods and functions. This can prove to be useful when you have an activity to perform and you would prefer not to compose a few unique renditions of that activity to help different types.

Assume you need to make a generic function that can change over string esteem into an enum. Generics can assist you with abstaining from utilizing dynamic, guarding your return type safe:

enum Size {
small,
medium,
large
}

T stringToEnum<T>(String str, Iterable<T> values) {
return values.firstWhere(
(value) => value.toString().split('.')[1] == str,
orElse: () => null,
);
}

Size size = stringToEnum<Size>("large", Size.values);

In the above code, T addresses the type to be given by the caller of stringToEnum(). That type will be utilized as the function’s return type, so when we call the function on the last line, the size will be securely composed. By chance, T will be given to the values boundary type, guaranteeing that only the right sorts will be acknowledged in the Iterable collection. The stringToEnum() function will work in a type-safe path for any enum. The gave string doesn’t coordinate with any of the enum values, and null will be returned.

Generic Classes:

You will likewise need to try not to make separate classes for the sole motivation behind dealing with various information types. Maybe you need to make a specific collection class, and still, keep up type safety.

class Data<T> {
List<T> _data = [];

void push(T item) => _data.add(item);
T pop() => _data.removeLast();
}

This class furnishes you with a collection that will never really push things onto data and pop them off. It’s difficult to get to the data’s values straightforwardly from outside a case, as the _data property is private.

final data = Data<String>();

data.push("A string."); // works
data.push(5); // errors

This data won’t permit a value of some unacceptable type to be added. Furthermore, the pop() technique will create a value with a coordinating with the return type.

Conclusion:

In the article, I have explained the Generics In Dart & Flutter of the basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Generics In Dart & Flutter 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 Generics In Dart & Flutter in your flutter projectsWe will show you what the Introduction is? and you’ve learned about utilizing generics to expand type safety within your applications, which will prompt fewer type-related errors and fewer terrible surprises for your users in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

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

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


How To Get Unique Device Details In Flutter?

0

In general, making a mobile application is an extremely mind-boggling and testing task. There are numerous frameworks available, which give magnificent highlights to create mobile applications. For creating mobile applications, Android gives a native structure framework on Java and Kotlin language, while iOS gives a system dependent on Objective-C/Swift language.

Subsequently, we need two unique languages and structures to create applications for both OS. Today, to beat structure this intricacy, several frameworks have presented that help both OS along desktop applications. These sorts of the framework are known as cross-platform development tools.

In this blog, we will explore How To Get Unique Device Details In Flutter?. We will implement a demo program and get unique device details for both Android and IOS using the device_info package in your flutter applications.

device_info | Flutter Package
Get current device information from within the Flutter application. Import package:device_info/device_info.dart…pub.dev

Table Of Contents::

Introduction

Implementation

Code Implement

Code File

Conclusion



Introduction:

Flutter gives get current device data from inside the Flutter application. How to get unique device details for both Android and IOS in flutter utilizing the device_info plugin. At the point when we talk about a unique device detail in native, we are having Settings.Secure.ANDROID_ID to get a one-of-a-kind device detail.

Demo Module :

This demo video shows how to get a unique device detail in a flutter. It shows how the device detail will work using the device_info package in your flutter applications. It shows when the user tap on the raised button, the unique device Andriod/Ios information like device name, version, identifier, etc shown on your screen. It will be shown on your device.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
device_info:

Step 2: Import

import 'package:device_info/device_info.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 device_detail_demo.dart inside the lib folder.

First, we will create a UI. In the body part, we will add a center widget. Inside, we will add a column widget. In this widget, we will add a mainAxisAlignmnet was center. It’s children’s property, add a RaisedButton(). In this button, we will add padding, color, and the OnPressed function. It’s child property, we will a text “Device Details”.

Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RaisedButton(
padding: EdgeInsets.all(14),
color: Colors.cyan[50],
onPressed: (){},
child: Text("Device Details",
style: TextStyle(color: Colors.black),),
),
],
),
),

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

Main Screen

We will create three strings deviceName, deviceVersion, and identifier.

String deviceName ='';
String deviceVersion ='';
String identifier= '';

Now, we will add the main function of the program. We will add future _deviceDetails(). Inside, we will add a final DeviceInfoPlugin is equal to the new DeviceInfoPlugin(). We will add the try{}method and we will import dart: io for the platform.

import 'dart:io';

If the platform is Andriod then, the build is equal deviceInfoPlugin for andriod info. Add a setState() method. In this method, we will add all string is equal to the build. Else if the platform is Ios then, the build is equal deviceInfoPlugin for ios info. Add a setState() method. In this method, we will add all string is equal to the build.

Future<void>_deviceDetails() async{
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
try {
if (Platform.isAndroid) {
var build = await deviceInfoPlugin.androidInfo;
setState(() {
deviceName = build.model;
deviceVersion = build.version.toString();
identifier = build.androidId;
});
//UUID for Android
} else if (Platform.isIOS) {
var data = await deviceInfoPlugin.iosInfo;
setState(() {
deviceName = data.name;
deviceVersion = data.systemVersion;
identifier = data.identifierForVendor;
});//UUID for iOS
}
} on PlatformException {
print('Failed to get platform version');
}

}

We will import services for PlatformException

import 'package:flutter/services.dart';

Now, we will add _deviceDetails() onPressed functon on the raised button

onPressed: (){
_deviceDetails();
},

We will add the device version, name, and the identifier is not empty then show a Column widget. In this widget, we will add all three text like Device Name, Device Version, and Device Identifier will be shown on your device. Otherwise, show an empty container.

deviceVersion.isNotEmpty && deviceName.isNotEmpty
&& identifier.isNotEmpty?
Column(
children: [
SizedBox(height: 30,),
Text("Device Name:- "+deviceName,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
Text("Device Version:- "+deviceVersion,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
Text("Device Identifier:- "+identifier,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
],
): Container(),

When the user taps the button then, all three data will be shown on your device. When we run the application, we ought to get the screen’s output like the underneath screen capture.

Final Output

Code File:

import 'dart:io';
import 'package:device_info/device_info.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class DeviceDetailDemo extends StatefulWidget {


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

class _DeviceDetailDemoState extends State<DeviceDetailDemo> {

String deviceName ='';
String deviceVersion ='';
String identifier= '';

Future<void>_deviceDetails() async{
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
try {
if (Platform.isAndroid) {
var build = await deviceInfoPlugin.androidInfo;
setState(() {
deviceName = build.model;
deviceVersion = build.version.toString();
identifier = build.androidId;
});
//UUID for Android
} else if (Platform.isIOS) {
var data = await deviceInfoPlugin.iosInfo;
setState(() {
deviceName = data.name;
deviceVersion = data.systemVersion;
identifier = data.identifierForVendor;
});//UUID for iOS
}
} on PlatformException {
print('Failed to get platform version');
}

}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.redAccent[100],
title: Text("Flutter Device Details Demo"),
automaticallyImplyLeading: false,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RaisedButton(
padding: EdgeInsets.all(14),
color: Colors.cyan[50],
onPressed: (){
_deviceDetails();
},
child: Text("Device Details",
style: TextStyle(color: Colors.black),),
),
deviceVersion.isNotEmpty && deviceName.isNotEmpty
&& identifier.isNotEmpty?
Column(
children: [
SizedBox(height: 30,),
Text("Device Name:- "+deviceName,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
Text("Device Version:- "+deviceVersion,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
Text("Device Identifier:- "+identifier,style: TextStyle
(color: Colors.red,
fontWeight: FontWeight.bold)),
SizedBox(height: 30,),
],
): Container(),
],
),
),
);
}
}

Conclusion:

In the article, I have explained the How To Get Unique Device Details In Flutter of the basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Get Unique Device Details 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 How To Get Unique Device Details In Flutter? in your flutter projectsWe will show you what the Introduction is?. Make a demo program for working Device Details and show when the user tap on the raised button, the unique device Andriod/Ios information like device name, version, identifier, etc shown on your screen using the device_info package in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.

find the source code of the Flutter Device Details Demo:

flutter-devs/flutter_device_details_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


Feedback In Flutter

Getting user feedback is fundamental to further develop your Flutter application. The simpler you make this process the more feedback you will get.

This blog will explore Feedback In Flutter. We will learn how to execute a demo program. We will show how users submit feedback using the feedback package and also how users send feedback via emails using the flutter_email_sender package in your Flutter applications.

For Feedback:

feedback | Flutter package
A Flutter package for getting better feedback. It allows the user to give interactive feedback directly in the app.pub.dev

For Send Emails:

flutter_email_sender | Flutter package
Allows to send emails from flutter using native platform functionality.pub.dev

For path_provider:

path_provider | Flutter package
Flutter plugin for getting commonly used locations on host platform file systems, such as the temp and app data…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::

Introduction

Implementation

Code Implement

Code File

Conclusion



Introduction:

The below demo video shows how to get users to submit feedback and how to send feedback via emails in Flutter. How these functions will work using the flutter_email_sender package and feedback package in your Flutter applications. You can see that the entire application will turn into a dialog, this is the very justification for why the BetterFeedback widget ought to be the root widget. Inside the feedback dialog, the user can explore the application, draw the application, and add a description. It will be shown on your device.

Demo Module::


Implementation:

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
feedback: ^3.1.0
flutter_email_sender: ^6.0.3
path_provider: ^2.1.4

Step 2: Import

import 'package:feedback/feedback.dart';
import 'package:flutter_email_sender/flutter_email_sender.dart';
import 'package:path_provider/path_provider.dart';

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

Step 4: We must also add the following intent to allow our application to send emails on Android. This can be done inside the android\app\src\main\AndroidManifest.xml file.

<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>

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.

In this code snippet, we start by wrapping the entire application with the BetterFeedback widget. This is required because this widget ought to be the root of the widget tree. In particular, it ought to be over any Navigator widget, including the navigator given by the MaterialApp widget.

void main() => runApp(const BetterFeedback(child: MyApp()));

In the main. dart file, we will make another HomePage() class. In this class, we made another function called _writeScreenshotToStorage to briefly save the screen capture in the user’s storage. We want to do this so it tends to be utilized as an email attachment. Inside the callback of the show function of the BetterFeedback widget, we call the send function of the FlutterEmailSender.

Future<String> _writeScreenshotToStorage(Uint8List screenshot) async {
final directory = await getTemporaryDirectory();
final filePath = '${directory.path}/feedback.png';
final file = File(filePath);

await file.writeAsBytes(screenshot);

return filePath;
}

Now, we will create an ElevatedButton() method. In this method, we can call the accompanying function BetterFeedback.of(context).show open the feedback modal. This function takes an Email instance. For this situation, we added the accompanying ascribes to the Email instance, the attachmentPaths which takes our new function to save the screen capture.

ElevatedButton(
onPressed: () => BetterFeedback.of(context).show(
(UserFeedback feedback) async => FlutterEmailSender.send(
Email(
attachmentPaths: [
await _writeScreenshotToStorage(feedback.screenshot),
],
body: feedback.text,
recipients: ['user@gmail.com'],
subject:
feedback.text.split(' ').take(7).toList().join(' '),
),
),
),
child: const Text('Give Feedback'),
),

We set the body to our feedback description. We have added the beneficiaries which will be the email of the developer and we have added the subject which will be the initial 7 expressions of the feedback message.

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

Code File:

import 'dart:io';

import 'package:feedback/feedback.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_email_sender/flutter_email_sender.dart';
import 'package:flutter_feedback_demo/splash_screen.dart';
import 'package:path_provider/path_provider.dart';

void main() => runApp(const BetterFeedback(child: MyApp()));

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

@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Splash(),
);
}
}

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

Future<String> _writeScreenshotToStorage(Uint8List screenshot) async {
final directory = await getTemporaryDirectory();
final filePath = '${directory.path}/feedback.png';
final file = File(filePath);

await file.writeAsBytes(screenshot);

return filePath;
}

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text("Flutter Feedback Demo"),
backgroundColor: Colors.teal.shade100,
centerTitle: true,
),
body: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: Image.asset(
"assets/logo.png",
height: 100,
)),
const SizedBox(
height: 50,
),
ElevatedButton(
onPressed: () => BetterFeedback.of(context).show(
(UserFeedback feedback) async => FlutterEmailSender.send(
Email(
attachmentPaths: [
await _writeScreenshotToStorage(feedback.screenshot),
],
body: feedback.text,
recipients: ['user@gmail.com'],
subject:
feedback.text.split(' ').take(7).toList().join(' '),
),
),
),
child: const Text('Give Feedback'),
),
],
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information on Trying the Feedback in your Flutter projects. We will show you what the Introduction is. Make a demo program for working on how to get users to submit feedback and how to send feedback via emails Using the feedback package and flutter_email_sender package in your Flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


Feel free to connect with us:
And read more articles from FlutterDevs.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.

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.


Story View In Flutter

In the present fast market, a few social channels have been out and out blasting and are the hot talk among individuals of all age gatherings. Stroll through the digital environment and you will notice new online media applications like Instagram standing hot as fire in the year and past.

At the point when you hear the term web-based media application, possibly applications like Facebook, Instagram, Twitter, or Linkedin come into view. Yet, have you at any point considered how to show a story on an online media application like Instagram?. Online media applications are an open gathering for you to associate with individuals from the whole way across the world with a simple UI.

In this blog, we will explore the Story View In Flutter. We will implement a story view demo program and how to create a story like WhatsApp using the story_view package in your flutter applications.

story_view | Flutter Package
Run this command: With Flutter: $ flutter pub add story_view This will add a line like this to your package’s…pub. dev

Table Of Contents::

Flutter Story View

Features

Properties

Implementation

Code Implement

Code File

Conclusion



Flutter Story View:

Story View Flutter Library Widget is helpful for the Flutter developer, By utilizing this library you can show Social media stories pages very much like WhatsApp Status Story or Instagram Status Story View. Can likewise be utilized inline/inside ListView or Column actually like the Google News application. Accompanies gestures to pause, forward, and go to the back page.

Demo Module :

This demo video shows how to create a story view in a flutter. It shows how the story view will work using the story_view package in your flutter applications. It displays your story like text, images, video, etc. Also, the user will forward, previous, and gesture to pause the stories. It will be shown on your device.

Features:

There are some features of Story View are:

  • > Simple Text Status story.
  • > Images, GIF Images Stories, and Video Stories( with caching enabled).
  • Gesture for Previous, Next, and Pause the Story.
  • Caption for each story item.
  • > An animated Progress indicator on top of every story view.

Properties:

There are some properties of Story View are:

  • controller: This property is used to controls the playback of the stories.
  • > onComplete: This property is used to the callback for when a full cycle of the story is shown. This will be called each time the full story completes when the repeat is set to true.
  • > storyItems: This property was not null and pages to display.
  • > onVerticalSwipeComplete: This property is used to the callback for when a vertical swipe gesture is detected. If you do not want to listen to such an event, do not provide it.
  • > onStoryShow: This property is used to the callback for when a story is currently being shown.
  • > progressPosition: This property is used where the progress indicator should be placed.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
story_view:

Step 2: Import

import 'package:story_view/story_view.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 status_screen.dart inside the lib folder.

In this screen, we will create a UI like WhatsApp. We will add a container widget. Inside, we will add network image, text, and onTap function wrap to the ListTile. In this function, we will navigate to StoryPageView() class.

Container(
height: 80,
padding: const EdgeInsets.all(8.0),
color: textfieldColor,
child: ListView(
children: <Widget>[
ListTile(
leading: CircleAvatar(
radius: 30,
backgroundImage: NetworkImage(
"https://images.unsplash.com/photo-1581803118522-7b72a50f7e9f?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bWFufGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"),
),
title: Text(
"Logan Veawer",
style: TextStyle(fontWeight: FontWeight.bold,color: white ),
),
subtitle: Text("Today, 20:16 PM",style: TextStyle(color:white.withOpacity(0.5)),),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StoryPageView())),
),
],
),
),

When the user presses the container then they will be shown a story page. We will deeply discuss the below code. When we run the application, we ought to get the screen’s output like the underneath screen capture.

Status Screen

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

First, we will create a final _controller that is equal to the StoryController().

final _controller = StoryController();

We will create a List of storyItems. First, we will add StoryItem.text means add only simple text status with the different background colors. Second, we will add StoryItem.pageImage means to add a URL of an image with the controller to control the story. Last, we will add the URL of the gif video with the controller and image fit.

final List<StoryItem> storyItems = [
StoryItem.text(title: '''“When you talk, you are only repeating something you know.
But if you listen, you may learn something new.”
– Dalai Lama''',
backgroundColor: Colors.blueGrey),
StoryItem.pageImage(
url:
"https://images.unsplash.com/photo-1553531384-cc64ac80f931?ixid=MnwxMjA3fDF8MHxzZWFyY2h8MXx8bW91bnRhaW58ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60",
controller: controller),
StoryItem.pageImage(
url:
"https://wp-modula.com/wp-content/uploads/2018/12/gifgif.gif",
controller: controller,
imageFit: BoxFit.contain),
];

We will return a Material() method. In this method, we will add StoryView(). Inside, we will add a list of storyItemscontrollerinline means if you would like to display the story as full-page, then set this to `false`. But in case you would display this as parts of a page like a ListView or Column then set this to true. We will add repeat means the user should the story be repeated forever then true otherwise, false.

return Material(
child: StoryView(
storyItems: storyItems,
controller: controller,
inline: false,
repeat: true,
),
);

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

Story View Page

Code File:

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

class StoryPageView extends StatefulWidget {
@override
_StoryPageViewState createState() => _StoryPageViewState();
}

class _StoryPageViewState extends State<StoryPageView> {
final controller = StoryController();

@override
Widget build(BuildContext context) {
final List<StoryItem> storyItems = [
StoryItem.text(title: '''“When you talk, you are only repeating something you know.
But if you listen, you may learn something new.”
– Dalai Lama''',
backgroundColor: Colors.blueGrey),
StoryItem.pageImage(
url:
"https://images.unsplash.com/photo-1553531384-cc64ac80f931?ixid=MnwxMjA3fDF8MHxzZWFyY2h8MXx8bW91bnRhaW58ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60",
controller: controller),
StoryItem.pageImage(
url:
"https://wp-modula.com/wp-content/uploads/2018/12/gifgif.gif",
controller: controller,
imageFit: BoxFit.contain),
];
return Material(
child: StoryView(
storyItems: storyItems,
controller: controller,
inline: false,
repeat: true,
),
);
}
}

Conclusion:

In the article, I have explained the Story View of the basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Story View 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 Story View in your flutter projectsWe will show you what the Story View is?. Show some properties and features of the Story View widget. Make a demo program for working Story View and It displays your story like text, images, video, etc. Also, the user will forward, previous, and gesture to pause the stories using the story_view package in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.

find the source code of the FlutterStory View Demo:

flutter-devs/flutter_story_view_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


Explore AnimatedOpacity In Flutter

0

Eliminating a widget in Flutter is truly straightforward and simple. You simply need to revamp the tree without it. However, imagine a scenario where you need the widget to vanish yet at the same time occupy a space on the screen with the goal that it doesn’t disturb the remainder of the format. Well to settle this, you can attempt the AnimatedOpacity.

AnimatedOpacity class — widgets library — Dart API
API docs for the AnimatedOpacity class from the widgets library, for the Dart programming language.api.flutter.dev

In this blog, we will Explore AnimatedOpacity In Flutter. We will see how to implement a demo program of the animated opacity with some properties and how to create it in your flutter applications.

Table Of Contents::

AnimatedOpacity

Properties

Code Implementation

Code File

Conclusion



AnimatedOpacity:

The AnimatedOpacity makes its child mostly transparent. This class colors its child into a middle buffer and afterward consolidates the child once again into the scene mostly transparent. For values of opacity other than 0.0 and 1.0, this class is moderately costly as it needs shading the child into a halfway support. For the value 0.0, the child is just not colored by any means. For the value 1.0, the child is colored without a moderate buffer.

Demo Module :

This demo video shows how to create animated opacity in a flutter. It shows how the animated opacity will work using the AnimatedOpacity class in your flutter applications. Basically, Opacity shows the disappear or presence of objects. In many situations, it can take a value from 1.0 to0.0 .1.0 methods full perceivability of the object and 0.0 means zero ability to see. Users can utilize any value in the middle of them for your ideal impact of opacity. It will be shown on your device.

Properties:

There ara some properties of AnimatedOpacity are:

  • key: This property is used to controls how one widget replaces another widget in the tree.
  • child: This property is the widget below this widget in the tree.
  • opacity: This property is used to the fraction to scale the child’s alpha value. An opacity of 1.0 is fully opaque. An opacity of 0.0 is fully transparent i.e., invisible. The opacity must not be null.
  • > curve: This property is a collection of common animation and used to adjust the rate of change of animation over time, allowing them to speed up and slow down, rather than moving at a constant rate.
  • > duration: This property represents a difference from one point in time to another. The duration may be “negative” if the difference is from a later time to an earlier.

Implementation:

Step 1: Add the assets

Add assets to pubspec — yaml file.

assets:
- assets/

Step 2: 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 opacity_demo.dart inside the lib folder.

First, we will create two variables. The first one is _opacity is equal to zero and the second one is _width is 230.

var _opacity = 0.0;
var _width = 230.0;

In the body part, we will create a Container widget. Inside the container, we will add alignment was center, height from mediaquery, and add the variable of width. We will add decoration with a border-radius that is circular and add color. It’s a child, we will add a Row widget. In this widget, we will add an image and text.

Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height *0.08,
width: _width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: Colors.cyan[400],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/devs.jpg",
scale: 10,
fit: BoxFit.contain,
),
Padding(
padding: const EdgeInsets.only(right:30.0),
child: Text(
'Flutter Devs',
style: TextStyle(color: Colors.white,
fontSize: 20.0)
,
),
),
],
),
),

Now let’s wrap the Row with an AnimatedOpacity widget and add the required properties to the widget.

In the AnimatedOpacity(), we will add duration for milliseconds. Users can choose seconds, microseconds, minutes, hours, and days for a long animation. We will add a curve that was bounceIn means an oscillating curve that first grows and then shrinks in magnitude. We will add variable _opacity on the opacity property.

AnimatedOpacity(
duration: Duration(milliseconds: 700),
curve: Curves.bounceIn,
opacity: _opacity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/devs.jpg",
scale: 10,
fit: BoxFit.contain,
),
Padding(
padding: const EdgeInsets.only(right:30.0),
child: Text(
'Flutter Devs',
style: TextStyle(color: Colors.white,
fontSize: 20.0)
,
),
),
],
),
),

Now, we wrap the whole code to GestureDetector() method. In this method, we will add onTap. On onTap, we will add setState() function. In this function, if _opacity is already 0.0 then make it 1.0 otherwise, it should go reverse to 0.0 . Simple toggle operation.

GestureDetector(
onTap: () {
setState(() {
_opacity = _opacity == 0.0 ? 1 : 0.0;
});
},
),

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

Output

Code File:

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

class OpacityDemo extends StatefulWidget {
@override
OpacityDemoState createState() => OpacityDemoState();
}

class OpacityDemoState extends State<OpacityDemo> {

var _opacity = 0.0;
var _width = 230.0;


@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffffffff),
appBar: AppBar(
backgroundColor: Colors.cyan[300],
title: Text("Flutter AnimatedOpacity Demo"),
automaticallyImplyLeading: false,
),
body: Center(
child: GestureDetector(
onTap: () {
setState(() {
_opacity = _opacity == 0.0 ? 1 : 0.0;
});
},
child: Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height *0.08,
width: _width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: Colors.cyan[400],
),
child: AnimatedOpacity(
duration: Duration(milliseconds: 700),
curve: Curves.bounceIn,
opacity: _opacity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/devs.jpg",
scale: 10,
fit: BoxFit.contain,
),
Padding(
padding: const EdgeInsets.only(right:30.0),
child: Text(
'Flutter Devs',
style: TextStyle(color: Colors.white,
fontSize: 20.0)
,
),
),
],
),
),
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information in Trying up the AnimatedOpacity in your flutter projectsWe will show you what the AnimatedOpacity is?. Some AnimatedOpacity properties make a demo program for working AnimatedOpacity and show that when the user taps the container then, the text will be shown with the animated effect. It can take a value from 1.0 to0.0 .1.0 methods full perceivability of the object and 0.0 means zero ability to see. Users can utilize any value in the middle of them for your ideal impact of opacity using the AnimatedOpacity class in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.

find the source code of the Flutter Animated Opacity Demo:

flutter-devs/flutter_animated_opacity_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


Custom Rolling Switch In Flutter

A switch is a two-state UI component used to flip between ON (Checked) or OFF (Unchecked) states. Ordinarily, it is a button with a thumb slider where the user can haul back and forth to pick an alternative as ON or OFF. Its working is like the house power switches.

In this article, we will explore the Custom Rolling Switch In Flutter. We will implement a custom rolling switch demo program with attractive animation and some properties using the lite_rolling_switch package in your flutter applications.

lite_rolling_switch | Flutter Package
Full customizable rolling switch widget for flutter apps based on Pedro Massango’s ‘crazy switch widget…pub. dev

Table Of Contents::

Introduction

Properties

Implementation

Code Implement

Code File

Conclusion



Introduction:

In Flutter, a switch is a widget used to choose between two alternatives, either ON or OFF. It doesn’t keep up the actual state. To keep up the states, it will call the onChanged property. Assuming the worth return by this property is true, the switch is ON and false when it is OFF. At the point when this property is invalid, the switch widget is debilitated.

Custom Rolling Switch button with alluring animation made to permit you to modify colors, symbols, and other restorative substances. Deal with the widget states similarly you do with the traditional material’s switch widget.

Demo Module :

This demo video shows how to create a custom rolling switch in a flutter. It shows how the custom rolling switch will work using the lite_rolling_switch package in your flutter applications. It shows toggle interaction where the user presses the button then, the switch will be rolling to another side with animation effect and the icons and text will be changed when the switch is rolling. It will be shown on your device.

Properties:

There are some properties of LiteRollingSwitch are:

  • > onChanged: This property is called when the user toggles the switch on or off.
  • > value: This property is used to determines whether this switch is on or off.
  • > animationDuration: This property is used how long an animation should take to complete one cycle.
  • > colorOn: This property is used to show color when the switch is On.
  • > colorOff: This property is used to show color when the switch is Off.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
lite_rolling_switch:

Step 2: Import

import 'package:lite_rolling_switch/lite_rolling_switch.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 demo_screen.dart inside the lib folder.

In the body part, we will add the Center() widget. Inside the widget, we will add a Column widget. In this widget, we will add the mainAxisAlignment was center. Inside, we will add text with style. We will add padding and on its child add LiteRollingSwitch() widget for custom.

Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Do you like Flutter?",style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold
),
),

Padding(
padding: EdgeInsets.only(top: 20),
child: LiteRollingSwitch(
value: true,
textOn: 'Yes',
textOff: 'No',
colorOn: Colors.cyan,
colorOff: Colors.red[400],
iconOn: Icons.check,
iconOff: Icons.power_settings_new,
animationDuration: Duration(milliseconds: 800),
onChanged: (bool state) {
print('turned ${(state) ? 'yes' : 'no'}');
},
),
)
],
),
),

Inside, we will add value was true means which determines whether this switch is on or offWe will add textOn was the string ‘Yes’ means when the switch is On then the text will be shown on the button and when textOff was the string ‘No’ means when the switch is Off then the text will be shown on the button. We will add colorOn means when the switch is On then the color will be shown on the button and when colorOff means when the switch is Off then the color will be shown on the button. We will add animationDuration means to delay the start of the animation and add onChanged means when the user toggles the switch on or off. When we run the application, we ought to get the screen’s output like the underneath screen capture.

Final Output

Code File:

import 'dart:ui';

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

class DemoScreen extends StatefulWidget {


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

class _DemoScreenState extends State<DemoScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.teal[50],
appBar: AppBar(
automaticallyImplyLeading: false,
backgroundColor: Colors.black,
title: Text('Flutter Custom Rolling Switch'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Do you like Flutter?",style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold
),
),

Padding(
padding: EdgeInsets.only(top: 20),
child: LiteRollingSwitch(
value: true,
textOn: 'Yes',
textOff: 'No',
colorOn: Colors.cyan,
colorOff: Colors.red[400],
iconOn: Icons.check,
iconOff: Icons.power_settings_new,
animationDuration: Duration(milliseconds: 800),
onChanged: (bool state) {
print('turned ${(state) ? 'yes' : 'no'}');
},
),
)
],
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information in Trying up the Custom Rolling Switch in your flutter projectsWe will show you what the introduction is?. Show some properties, make a demo program for working Custom Rolling Switch and show toggle interaction where the user presses the button then, the switch will be rolling to another side with animation effect and the icons and text will be changed when the switch is rolling using the lite_rolling_switch package in your flutter applications, so please try it.

❤ ❤ Thanks for reading this article ❤❤


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

Clap 👏 If this article helps you.

find the source code of the Flutter Custom Rolling Switch Demo:

flutter-devs/flutter_custom_rolling_switch_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


SelectableText Widget In Flutter

0

At times you might need to make the Text content of your mobile selectable to utilize functionalities like a copy. On the off chance that you need to show text in Flutter, the normal route is by utilizing a Text widget. Be that as it may, it doesn’t permit the user to choose the text. If you need the user to have the option to select the text, you can utilize Flutter’s SelectableText widget.

In this blog, we will explore the SelectableText Widget In Flutter. We will see how to implement a demo program of the selectable text widget and show you how to utilize that widget to copy/select the text, making a text selectable is really simple in Flutter, you simply need to utilize the SelectableText widget in your flutter applications.

SelectableText class – material library – Dart API
A run of selectable text with a single style. The SelectableText widget displays a string of text with a single style…master-api. flutter.dev

Table Of Contents::

SelectableText Widget

Properties

Code Implement

Code File

Conclusion



SelectableText Widget:

The SelectableText widget shows a string of text with a solitary style. The string may break across various lines or may all be shown on a similar line contingent upon the design imperatives. To utilize SelectableText, there is just one required boundary which is the text to be shown was String.

SelectableText Widget in Flutter allows the user to Select/Copy the content on the UI. The typical Text Widget in Flutter won’t permit a copy/select element by double-tapping on the content, we can either select/copy the content. To take care of this issue, the Flutter discharge came out with the SelectableText Widget.

For more info on SelectableText Widget ,Watch this video By Flutter :

Below demo video shows how to create a selectable text in a flutter. It shows how the selectable text widget will work using the SelectableText Widget in your flutter applications. It shows two buttons on the center screen. When the user taps on these buttons, it will show allow the user to copy/select a feature by double-tapping on the text, we can either select/copy the text. It will be shown on your device.

Demo Module :


Properties:

There are some properties of the SelectableText widget are:

  • > data: This property is a significant property where the data to appear as a feature of the SelectableText must appear. The text to be shown.
  • > onTap: This property is utilized for the callback function that gets terminated at whatever point somebody taps on the Text of the SelectableText. Of course, the tapping opens the select all/copy choice. On the off chance that you need to perform different exercises, make a point to supersede them here.
  • > textSpan: This property is utilized as a component of the SelectableText.rich() widget. This allows you to pick the TextSpan which can hold various texts on the SelectableText widget.
  • > autofocus: This property is used whether it should focus itself if nothing else is already focused. Defaults to false.
  • > maxLines: This property is used for the maximum number of lines for the text to span, wrapping if necessary.
  • > toolbarOptions: This property is used to create a toolbar configuration with given options. All options default to false if they are not explicitly set.
  • > enableInteractiveSelection: This property is used to Whether to select text and show the copy/paste/cut menu when long-pressed. Defaults to true.

How to implement code in dart file :

You need to implement it in your code respectively:

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

We will make two buttons on this home page screen, and each button will show SelectableText Widget, and we will show the deeply below detail. When we run the application, we ought to get the screen’s output like the underneath screen capture.

Home Screen

We will deeply define below are the two different uses of the SelectableText class and the resulting output.

SelectableText Basic:

In the body part, we will add the center widget. In this widget, we will add SelectableText() method. Inside this method, we will add text, toolbarOptions. In these options, when selection is active, it shows ‘Copy’ and ‘Select all’ options. You can utilize the toolbarOptions property to pass an instance of ToolbarOptions. The constructor of ToolbarOptions has all values are copied, cut, paste, and selectAll set to false by default. You need to set every option to true on the off chance that you need it to show up on the toolbar. Be that as it may, cut and paste will not be showed regardless of whether you set it to true.

Center(
child: SelectableText(
"Flutter Tutorial by Flutter Dev's.com",
style: TextStyle(color: Colors.blue,
fontWeight: FontWeight.bold,
fontSize: 45
),
textAlign: TextAlign.center,
onTap: () => print('Tapped'),
toolbarOptions: ToolbarOptions(copy: true, selectAll: true,),
showCursor: true,
cursorWidth: 2,
cursorColor: Colors.red,
cursorRadius: Radius.circular(5),

),
),

We will add the showCursor option true, cursor width, color, and radius. When we run the application, we ought to get the screen’s output like the underneath screen capture.

SelectableText Basic

SelectableText RichText:

In the body part, we will add the center widget. In this widget, we will add SelectableText.rich() method. In this method, that you need the content to have various formats, utilizing RichText is the normal methodology in Flutter. It’s likewise conceivable to have a selectable RichText by utilizing SelectableText.rich named constructor. It acknowledges an TextSpan as the first and the solitary required boundary rather than a String. Different boundaries, which are optional, are the same equivalent to the main constructor.

Center(
child: SelectableText.rich(
TextSpan(
children: <TextSpan>[
TextSpan(text: 'Flutter', style: TextStyle(color: Colors.blue)),
TextSpan(text: 'Devs', style: TextStyle(color: Colors.black)),
TextSpan(text: '.com', style: TextStyle(color: Colors.red)),
],
),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 48),
textAlign: TextAlign.center,
onTap: () => print('Tapped'),
toolbarOptions: ToolbarOptions(copy: true, selectAll: false),
showCursor: true,
cursorWidth: 2,
cursorColor: Colors.black,
cursorRadius: Radius.circular(5),
),
)

We will add toolbarOptons, which shows ‘Copy’ was true and ‘Select all’ was false options. When we run the application, we ought to get the screen’s output like the underneath screen capture.

SelectableText RichText

Code File:

import 'package:flutter/material.dart';
import 'package:flutter_selectabletext_widget/selectable_text_rich_screen.dart';
import 'package:flutter_selectabletext_widget/selectable_text_screen.dart';



class HomePageScreen extends StatefulWidget {
@override
_HomePageScreenState createState() => _HomePageScreenState();
}

class _HomePageScreenState extends State<HomePageScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.blueGrey[100],
appBar: AppBar(
title: Text("Flutter SelectableText Widget Demo"),
automaticallyImplyLeading: false,
centerTitle: true,
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[

RaisedButton(
child: Text('Selectable Text',style: TextStyle(color: Colors.black),),
color: Colors.green[100],
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => SelectableTextScreen()));
},
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20))),
padding: EdgeInsets.all(13),
),
SizedBox(height: 8,),
RaisedButton(
child: Text('Selectable Text Rich',style: TextStyle(color: Colors.black),),
color: Colors.green[100],
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => SelectableTextRichScreen()));
},
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20))),
padding: EdgeInsets.all(13),

),
SizedBox(height: 8,),

],
),
)
), //center
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information in Trying up the SelectableText Widget in your flutter projects. We will show you what the SelectableText Widget is?, some properties using in SelectableText Widget, and make a demo program for working SelectableText Widget and show you how to use that widget to copy/select the text, making a text selectable is pretty easy in Flutter using the SelectableText Widget widget in your flutter applications, So please try it.

❤ ❤ Thanks for reading this article ❤❤


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

Clap 👏 If this article helps you.

find the source code of the Flutter SelectableText Widget Demo:

flutter-devs/flutter_selectabletext_widget_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


Explore FadeTransition Widget In Flutter

0

Flutter accompanies an amazing arrangement of animation widgets to add movement and embellishments to your flutter application. Be that as it may, imagine a scenario in which you need something truly basic. Perhaps something as straightforward as fading a widget. The Flutter SDK offers the FadeTransition widget for you. Flutter has an amazing animation engine for adding movement and impacts to your Flutter application. However, once in a while, you simply need to accomplish something simple — like fading in a widget. Flutter has a lot of transitions prepared to drop into your Flutter application.

In this blog, we will Explore FadeTransition Widget In Flutter. We will see how to implement a demo program of the fade transition widget and how to use FadeTransition widget in your flutter applications which can be used to animate the opacity of a widget.

FadeTransition class – widgets library – Dart API
API docs for the FadeTransition class from the widgets library, for the Dart programming language.api.flutter.dev

Table Of Contents::

FadeTransition Widget

Properties

Implementation

Code Implement

Code File

Conclusion



FadeTransition Widget:

FadeTransition allows you to blur a widget in and out by animating its opacity. In this way, you simply need to give the opacity boundary with animation and a child widget on which the animation must be performed. Yet, where does the animation come from? You initially need to make an AminationController set the duration and afterward make the animation giving the beginning and end opacity values.

For more info on FadeTransition Widget,Watch this video By Flutter :

Below demo video shows how to create a fading animation in a flutter. It shows how the fading animation will work using the FadeTransition widget in your flutter applications. It shows or hides a widget. The reverse fade transition animation was true. It depends on the duration of when the widget will show or hide. It will be shown on your device.

Demo Module :


Properties:

There are some properties of FadeTransitionwidget is:

  • >Key key: The widget’s key, used to control if it should be replaced.
  • >Animation<double> opacity : The animation that controls the fade transition of the child.
  • >bool alwaysIncludeSemantics : Whether the semantic information of the children is always included. Defaults to false.
  • >Widget child: The widget under this widget in the tree where the animation will be applied.

Implementation:

Step 1: Add the assets

Add assets to pubspec — yaml file.

assets:
- assets/

Step 2: 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 calledfade_transition_demo.dart inside the lib folder.

In the first place, you need to make your class extends State with TickerProviderStateMixin. That empowers you to pass this as the vsync the contention in the constructor of AnimationController.We will pass is an Animation<double> that characterizes the animation to be applied to the child widget. Making an Animation expects you to make an AnimationController.

AnimationController _controller;
Animation<double> _animation;

We will add initState() method. In this method, we will add a _controller is equal to the AnimationController(). Inside, we will add the duration of three seconds means is only used when going forward. Otherwise, it specifies the duration going in both directions. We will animation repeat in a bracket reverse is true. We will create the Animation instance, then add _animaton is equal to the CurvedAnimation(). Inside, we will add a parent for the animation controller. The parent arguments must not be null. We will add curve means to use in the forward direction. We will add CurvedAnimation with easeIn curve.

initState() {
super.initState();

_controller = AnimationController(
duration: const Duration(seconds: 3),
vsync: this,

)..repeat(reverse:true);
_animation = CurvedAnimation(
parent: _controller,
curve: Curves.easeIn
);
}

We will create a void dispose() method. In this method, we will be adding a code for disposing of the controller inside.

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

We will create a FadeTransition() method. In this method, we will add opacity means animation that controls the opacity of the child. We will add a column widget. In this widget, we will add text and images.

FadeTransition(
opacity: _animation,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Flutter Dev's",style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold),
),
Image.asset("assets/devs.jpg"),
],
),
),

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

Final Output

Code File:

import 'package:flutter/material.dart';

class FadeTransitionDemo extends StatefulWidget {
_FadeTransitionDemoState createState() => _FadeTransitionDemoState();
}

class _FadeTransitionDemoState extends State<FadeTransitionDemo>
with TickerProviderStateMixin {

AnimationController _controller;
Animation<double> _animation;

initState() {
super.initState();

_controller = AnimationController(
duration: const Duration(seconds: 3),
vsync: this,

)..repeat(reverse:true);
_animation = CurvedAnimation(
parent: _controller,
curve: Curves.easeIn
);
}

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

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xffffffff),
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text( 'Flutter FadeTransition Widget Demo',),
),
body: Center(
child: FadeTransition(
opacity: _animation,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Flutter Dev's",style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold),
),
Image.asset("assets/devs.jpg"),
],
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information in Trying up the FadeTransition Widget in your flutter projectsWe will show you what the FadeTransition Widget is?. Some faadetransition widget properties, make a demo program for working FadeTransition Widget, and can create a fading animation to show or hide a widget. The reverse fade transition animation was true. It depends on the duration of when the widget will show or hide using the FadeTransition widget in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.

find the source code of the Flutter Fade Transition Widget Demo:

flutter-devs/flutter_fade_transition_widget_demo
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…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 FacebookGitHubTwitter, and LinkedIn for any flutter-related queries.

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


Send Emails in Flutter

0

This blog will explore the Send Emails in Flutter. We will learn how to execute a demo program. We will show how to send emails using the flutter_email_sender package in your Flutter applications.

For Send Emails:

flutter_email_sender | Flutter package
Allows to send emails from Flutter using native platform functionality.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::

Introduction

Implementation

Code Implement

Code File

Conclusion



Introduction:

In Flutter you can easily permit the user to send emails from your application. The methodology that will be discussed here, makes use of the accessible email clients from the user’s devices.

Thus, you don’t have to set up a Simple Mail Transfer Convention (SMTP) client. It allows sending emails from Flutter using a native platform. In Android, it opens the default mail application using intent. In iOS MFMailComposeViewController is used to compose an email.

The below demo video shows how to implement Send Emails in Flutter and how to send email will work using the flutter_email_sender package in your Flutter applications. It will be shown on your device.

Demo Module::


Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
flutter_email_sender: ^6.0.3

Step 2: Import

import 'package:flutter_email_sender/flutter_email_sender.dart';

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

Step 4: We must also add the following intent to allow our application to send emails on Android. This can be done inside the android\app\src\main\AndroidManifest.xml file.

<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>

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.

In main. dart file, we will create a HomePage class. In this class, we will add a floatingActionButton widget. In this widget, we will add backgroundColor was blueAccent, add an email icon with white color on its child method, and add the onPressed function. 

      floatingActionButton: FloatingActionButton(
backgroundColor: Colors.blueAccent,
child: const Icon(
Icons.mail_outline,
color: Colors.white,
),
onPressed: () async => FlutterEmailSender.send(
Email(
body: 'I would like to request more information.',
recipients: ['user@gmail.com'],
subject: 'Information request',
bcc: ['test@gmail.com'],
cc: ['support@gmail.com'],
),
).then(
(_) => ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
backgroundColor: Colors.blueAccent,
content: Text(
'The email has either been sent or you navigated back using the back button.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16),
),
),
),
),
),

In this function, we will add the FlutterEmailSender.send() method. In this method, we will add an Email function. Inside this function, we will add body, recipients, subject, bcc, and cc. Also, we will add SnackBar() for using navigated back or sent email.

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

Code File:

import 'package:flutter/material.dart';
import 'package:flutter_email_sende/splash_screen.dart';
import 'package:flutter_email_sender/flutter_email_sender.dart';

void main() => runApp(const MyApp());

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

@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Splash(),
);
}
}

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

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter Send Emails Demo'),
backgroundColor: Colors.cyan,
automaticallyImplyLeading: false,
centerTitle: true,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(child: Image.asset("assets/logo.png",height: 100,))
],
),
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.blueAccent,
child: const Icon(
Icons.mail_outline,
color: Colors.white,
),
onPressed: () async => FlutterEmailSender.send(
Email(
body: 'I would like to request more information.',
recipients: ['user@gmail.com'],
subject: 'Information request',
bcc: ['test@gmail.com'],
cc: ['support@gmail.com'],
),
).then(
(_) => ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
backgroundColor: Colors.blueAccent,
content: Text(
'The email has either been sent or you navigated back using the back button.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16),
),
),
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information on Trying the Send Emails in your Flutter projects. We will show you what the Introduction is. Make a demo program for working on Send Emails Using the flutter_email_sender package in your Flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


Feel free to connect with us:
And read more articles from FlutterDevs.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.

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.


Abstract Factory Method Design Patterns For Dart & Flutter

0

Abstract Factory design pattern is one of the Creational designs. Abstract Factory design is practically like Factory Pattern and is considered as one more layer of reflection over factory design. Abstract Factory designs work around a super-factory facility that makes different factories.
Abstract factory design execution furnishes us with a system that permits us to make protests that follow a general pattern. So at runtime, the abstract factory is combined with any ideal substantial factory which can make objects of the selected type.

This article will explore the Abstract Factory Method Design Patterns For Flutter. We will perceive how to execute a demo program and we are going to learn about how we can use it in your flutter applications.

Table Of Contents ::

What Is Abstract Factory Method?

Advantages of Abstract Factory Pattern

Implementation

Conclusion



What Is Abstract Factory Method?

Characterize an interface or abstract class for making groups of related (or subordinate) objects yet without indicating their substantial sub-classes

That implies Abstract Factory lets a class returns a factory of classes. Thus, this is the explanation that Abstract Factory Pattern is one level higher than the Factory Pattern. This factory class returns various subclasses given the info given and the factory class utilizes an if-else or change proclamation to accomplish this.

From the get-go, it appears to be confounding yet when you see the execution, it’s truly simple to get a handle on and comprehend the minor distinction between Factory and Abstract Factory patterns.

An Abstract Factory Pattern is also known as Kit.

How about we see the GOFs portrayal of the Abstract Factory Pattern :

  • > AbstractFactory:- Proclaims an interface of interaction for tasks that make abstract product objects.
  • > ConcreteFactory:- Executes the operations pronounced in the Abstract Factory to make substantial product objects.
  • > Product:- Characterizes a product object to be made by comparing substantial factories and executes the AbstractProduct interface.
  • > Client:- Utilizes connection points proclaimed by AbstractFactory and AbstractProduct classes.

Abstract Factory gives connection points to making groups of related or subordinate objects without indicating their substantial classes.

Client programming makes a substantial execution of the abstract factory and afterward utilizes the nonexclusive connection points to make substantial items that are essential for the group of objects.

Advantages of Abstract Factory Pattern:

  • > Isolation of concrete classes: The Abstract Factory pattern assists you with controlling the classes of objects that an application makes. Since a factory exemplifies the obligation and the most common way of making product objects, it disconnects clients from execution classes.
  • > Exchanging Product Families quickly: The class of a substantial factory shows up just a single time in an application, that is where it’s launched. This makes it simple to change the substantial factory an application utilizes. It can utilize different product setups just by changing the substantial factory.
  • > Promoting consistency among products: When product objects in a family are intended to cooperate, an application genuinely should utilize objects from just a single family at a time.

Implementation:

Lets create an abstract class Color.

abstract class Color
{
void paint();
}

Presently make substantial classes executing a similar class Shape.

class RedColor implements Color {
@override
void paint() {
print("RedColor");
}
}class BlueColor implements Color {
@override
void paint() {
print("BlueColor");
}
}class Yellow implements Color {
@override
void paint() {
print("Yellow");
}
}class Black implements Color {
@override
void paint() {
print("Black");
}
}

Now create an Abstract class to get factories for Color Objects.

abstract class AbstractFactory
{
Color getColor(String colorType);
}

Presently make Factory classes extending out AbstractFactory to create an object of the substantial class based of given data.

class ColorFactory extends AbstractFactory
{
@Override
Color getColor(String colorType)
{
if (colorType == "YELLOW") {
return new Yellow();
} else if (colorType == "BLACK") {
return new Black();
}
return null;
}
}
class RedColorFactory extends AbstractFactory
{
@Override
Color getColor(String colorType)
{
if (colorType == "YELLOW") {
return new RedYellow();
} else if (colorType == "BLACK") {
return new RedBlack();
}
return null;
}
}

Presently make a Factory generator/maker class to get factories plants by passing data like Color.

class FactoryProducer
{
static AbstractFactory getFactory(bool red)
{
if (red) {
return new RedColorFactory();
} else {
return new ColorFactory();
}
}
}

Utilize the FactoryProducer to set AbstractFactory up to get factories of substantial classes by passing data like sort.

class AbstractFactoryPatternDemo
{
static void main()
{

AbstractFactory colorFactory = FactoryProducer.getFactory(false);

Color color1 = colorFactory.getColor("YELLOW");
color1.paint(); //Prints "Yellow"
Color color2 = colorFactory.getColor("BLACK");
color2.paint(); //Prints "Black"
AbstractFactory colorFactory1 = FactoryProducer.getFactory(true);
Color color3 = colorFactory1.getColor("YELLOW");
color3.paint(); //Prints "RedYellow"
Color color4 = colorFactory1.getColor("BLACK");
color4.paint(); //Prints "RedBlack"

}
}

Conclusion:

In the article, I have explained the basic structure of Abstract Factory Design Patterns For Dart and Flutter; you can modify this code according to your choice.

I hope this blog will provide you with sufficient information on Trying up the Abstract Factory Method Design Patterns For Dart and Flutter in your projectsSo please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

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

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