Google search engine
Home Blog Page 13

Difference Between Ephemeral State & App State In Flutter

0

Numerous application advancements are sent off on the lookout, reliably working on the various applications’ worth. Flutter is one such innovation that is utilized in most present-day applications.

Out of the itemized course of Flutter improvement, dealing with the various states is a significant undertaking and incorporates two essential states-ephemeral states and an app state.

This blog will explore the Difference Between Ephemeral State & App State In Flutter. We will perceive how to execute a demo program and understand all about these states in detail in your flutter applications.

Table Of Contents::

What is State?

What is the Ephemeral State?

What is App State?

Difference between Ephemeral state and App state

Conclusion



What is State?

The state of an application incorporates fonts, textures, animation state, UI variables in the Flutter, the application’s resources, and so forth. Subsequently, all parts of the application’s memory comprise its state. The condition of an application is considered during the application’s plan, and large numbers of these parts, similar to textures, are overseen inside.

To change your widget, you want to update the state object, which should be possible by utilizing the setState() capability accessible for Stateful widgets. The setState() capability permits us to set the properties of the state object that sets off a redraw of the UI.

State the executives is one of the most famous and fundamental cycles in the lifecycle of an application. As indicated by official documentation, Flutter is decisive. It implies Flutter constructs its UI by mirroring the present status of your application.

All Flutter applications contain widgets; consequently, their state management is held simply by widgets. The key classification of the Flutter widgets incorporates:

> Stateless widget:

This widget, once made, can’t get changed or altered and has no inside state. It should be introduced again for changes or alterations.

> Stateful widget:

This widget contains a state and is dynamic. Thus, it is not difficult to alter and adjust this widget without re-introduction.
Hence, the key expresses that can be overseen incorporate the ephemeral state and application state. Tell us about these states individually.

What is the Ephemeral State?

It is likewise called local state or UI state. It is the condition of the application containing a solitary widget. There is no requirement for various state management strategies as it is connected with the particular state.

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

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

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

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

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

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

class _MyHomePageState extends State {
String stringName = "Flutter";

@override
Widget build(BuildContext context) {
return ElevatedButton(
child: Text(
stringName,
style: const TextStyle(fontSize: 22),
),
onPressed: () {
setState(() {
stringName = stringName == "Flutter" ? "Flutter Devs" : "Flutter";
});
});
}
}

In the above model, the stringName is an ephemeral state. Here, just the setState() capability inside the StatefulWidget’s class can get to the stringName. The build strategy calls a setState() capability, which does the change in the state variables. At the point when this strategy is executed, the widget object is supplanted with the enhanced one, which gives the altered variable worth.

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

What is App State?

It is additionally called the shared state or application state. It is the condition of the application, which incorporates everything except the ephemeral state. The application state is utilized internationally and can be shared across the various pieces of the application. It very well may be kept between various client meetings.

The application state management is achieved utilizing the provider package, which is the outsider library. The three unique ideas concerning the equivalent are:

> ChangeNotifier:

It offers change notifications to the listeners and is a basic class that is not difficult to upgrade, implement, and comprehend. It tends to be utilized for a predetermined number of listeners and is utilized to notice a model for any change for the listener. The main strategy used to illuminate the listeners is “notifyListener().”

The “ChangeNotifier” extends the “Counter,” which notifies the listeners by calling “notify listeners().” The “ChangeNotifier” involves this single strategy for execution. Various functions like “increment” and “decrement” are utilized to increase or decrease the values.

class Counter with ChangeNotifier {
int _counter;

Counter(this._counter);

getCounter() => _counter;

setCounter(int counter) => _counter = counter;

void increment() {
_counter++;
notifyListeners();
}

void decrement() {
_counter--;
notifyListeners();
}
}

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

Output

> ChangeNotifierProvider:

This widget offers an example of the ChangeNotifier to its supporters. It is presented from the provider package and has a builder, making the new case of the Counter model. ChangeNotifierProvider consequently calls the “dispose()” technique on the Counter model when the example isn’t needed. Further, it doesn’t remake Counter until the need emerges.

It is not difficult to utilize MultiProvider assuming that there is a need to give more than one class. It eliminates the need to settle the current providers into the child of increasingly an as it contains a committed list of various providers in the extent of the class.

> Consumer:

It calls the provider in the new widget and further delegates the widget’s build implementation to the builder. Hence, this widget is kept as deep as possible in the tree.

It calls the provider in the new widget and further delegates the widget’s construct execution to the builder. Consequently, this widget is kept as profound as conceivable in the tree.

Difference between Ephemeral state and App state

Priorities straight, there is no widespread rule to recognize ephemeral states and application states in Flutter. This is because the application might have begun with the ephemeral state but may before long be moved to the application state with the expanded number of highlights.

Further, the starter application with each “Flutter make” incorporates “State” and “setState” to oversee various conditions of the Flutter applications. The other situation is the “_index” variable in the application state assuming the chosen tab in the base route bar isn’t the ephemeral state.

The flutter application utilizes various widgets. The information utilized by the majority of the widgets and a portion of the widgets goes under the application state. Simultaneously, the information utilized by a solitary widget goes under an ephemeral state. As widgets can begin utilizing information whenever given the application’s necessities and elements, the application state, and ephemeral state can be changed during the development cycle.

Conclusion:

I hope this blog will provide you with sufficient information on Trying the Difference Between Ephemeral State & App State In Flutter. Consequently, it becomes essential to figure out the distinction between its two main states- the ephemeral state and the app state.

The ephemeral state is specific to the single widget and is managed by “State” and “setState().” Everything excluding the ephemeral state is the app state. Further, with no clear demarcation between these two states, the difference is based on the complexity and app preferences. 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! For any flutter-related queries, you can connect with us on FacebookGitHubTwitter, 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.


Cupertino Segmented Control In Flutter

0

The CupertinoSegmentedControl widget in Flutter shows widgets from a map in a horizontal list and makes an iOS-style portioned control bar. At the point when one choice in the segmented control is chosen, different choices in the divided control cease to be chosen.

This blog will explore the Cupertino Segmented Control In Flutter. We will see how to implement a demo program. We are going to learn about how we can utilize CupertinoSegmentedControl and how to customize the style of Cupertino Segmented Control using various properties in your flutter applications.

CupertinoSegmentedControl class – Cupertino library – Dart API
An iOS-style segmented control. Displays the widgets provided in the Map of children in a horizontal list. Used to…api. flutter.dev

Table Of Contents ::

Introduction

Constructor

Properties

Code Implement

Code File

Conclusion



Introduction:

Cupertino segmented control is the only ios style segmented control in a flutter. CupertinoSegmentedControl widget allows us to make a segmented control in ios style. It shows an even horizontal list of choices. We can choose a choice by tapping on it.

These choices are created utilizing a map (key-value pairs <String, widget>). The keys ought to be comparable for every one of the children on the map. We will utilize the keys to recognize the choice by the user. The values can be any widget and needn’t bother to be comparative. At the point when we select one choice, we can’t choose different choices in the segmented control. It implies we can’t choose more than each choice in time.

Demo Module ::

This demo video shows how to use a Cupertino segmented control in a flutter and shows how a Cupertino context menu will work in your flutter applications. It shows when the code successfully runs, then the user was tapping the button highlighted and shows the content. It will be shown on your device

Constructor:

To utilize CupertinoSegmentedControl, you need to call the constructor underneath:

To make a Cupertino segmented control in flutter we need to utilize CupertinoSegmentedControl class. Call the constructor of the class and give the required properties.

CupertinoSegmentedControl({
Key? key,
required this.children,
required this.onValueChanged,
this.groupValue,
this.unselectedColor,
this.selectedColor,
this.borderColor,
this.pressedColor,
this.padding,
})

The constructor has two required properties children & onValueChanged. The children should be of type map.

Properties:

There are some properties of CupertinoSegmentedControl are:

  • > children — This property is used for identifying keys and corresponding widget values in the segmented control. The map must have more than one entry. This attribute must be an ordered [Map] such as a [LinkedHashMap].
  • > onValueChanged — This property is used to take a callback function as a value. It will invoke every time the user selects an option. We can get the selected value inside this function. Based on the value we will update the UI.
  • > groupValue — This property is used to this indicates the option that is selected currently. It should be one of the keys in the map or null. If null no option is selected. If it is key then it will select the option for that key.
  • > selectedColor — This property is utilized to fill the background of the chosen widget and as the text color of unselected widgets. Defaults to [CupertinoTheme]’s ‘primary color’ if null.
  • > unselectedColor — This property is utilized to fill the backgrounds of unselected widgets and as the text color of the selected widget. Defaults to [CupertinoTheme]’s `primaryContrastingColor` if null.
  • > borderColor — This property is utilized for the color used as the border around each widget. Defaults to [CupertinoTheme]’s `primary color` if null.
  • > pressedColor — This property is utilized to the color used to fill the background of the widget the user is temporarily interacting with through a long press or drag. Defaults to the selected color at 20% opacity if null.
  • > padding — This property is utilized by the CupertinoSegmentedControl and will be placed inside this padding. Defaults to EdgeInsets.symmetric(horizontal: 16.0).

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 the main.dart file. We will create a new class MyHomePage(). In this class, first, we will declare an integer variable that will hold the selected key. the selected value is equal to zero.

int selectedValue = 0;

We will show segmented control with three choices. We will show the comparing picture when the choice is chosen. For this, we will require a map for children and a list for holding pictures.

Map<int, Widget> children = <int, Widget>{
0: const Text("Flutter"),
1: const Text("NodeJS"),
2: const Text("React Native"),
};

Now we will declare the List with the path to images. Please download three images for flutter, node js, and react native. Name them as Flutter, NodeJS, and React Native. Add the images to the assets folder.

List<String> images = [
"assets/img1.png",
"assets/img2.png",
"assets/img3.png"
];

In the body part, we will add the column widget. In this widget, we will add the Container widget. In this widget, we will add the CupertinoSegmentedControl widget. We will add children, onValueChanged, and add some properties.

Column(
children: [
Container(
width: double.infinity,
child: CupertinoSegmentedControl<int>(
children: children,
onValueChanged: (value) {
selectedValue = value;
setState(() {});
},
selectedColor: CupertinoColors.black,
unselectedColor: CupertinoColors.white,
borderColor: CupertinoColors.inactiveGray,
pressedColor: CupertinoColors.inactiveGray,
groupValue: selectedValue,
),
),
Container(
height: MediaQuery.of(context).size.height * 0.60,
width: double.infinity,
child: Image.asset(images[selectedValue], fit: BoxFit.contain),
)
],
),

Also, we will add one more container widget with height and width for the images.

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/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cupertino_segmented_control_demo/splash_screen.dart';

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

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

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

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

@override
_MyHomePageState createState() {
return _MyHomePageState();
}
}

class _MyHomePageState extends State<MyHomePage> {
int selectedValue = 0;
Map<int, Widget> children = <int, Widget>{
0: const Text("Flutter"),
1: const Text("NodeJS "),
2: const Text("React Native"),
};

List<String> images = [
"assets/img1.png",
"assets/img2.png",
"assets/img3.png"
];

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xffFFFFFF),
appBar: AppBar(
title: const Text(
"Flutter Cupertino Segmented Control Demo",
style: TextStyle(fontSize: 19),
),
centerTitle: true,
automaticallyImplyLeading: false,
backgroundColor: Colors.teal,
),
body: Material(
child: Container(
margin: const EdgeInsets.only(top: 80, left: 20, right: 20),
child: Column(
children: [
Container(
width: double.infinity,
child: CupertinoSegmentedControl<int>(
children: children,
onValueChanged: (value) {
selectedValue = value;
setState(() {});
},
selectedColor: CupertinoColors.black,
unselectedColor: CupertinoColors.white,
borderColor: CupertinoColors.inactiveGray,
pressedColor: CupertinoColors.inactiveGray,
groupValue: selectedValue,
),
),
Container(
height: MediaQuery.of(context).size.height * 0.60,
width: double.infinity,
child: Image.asset(images[selectedValue], fit: BoxFit.contain),
)
],
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information on Trying Cupertino Segmented Control in your flutter projectsWe will show you what the Introduction is. Make a demo program for working with Cupertino Segmented Control and you’ve learned how to create & use Cupertino Segmented Control 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! 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.


Inbuild List Methods In Dart

0

In Dart programming, the List data type is like exhibits in other programming dialects. A list is utilized to address an assortment of items. It is an arranged gathering of objects. The core libraries in Dart are answerable for the presence of the List class, its creation, and manipulation.

This blog will explore the Inbuild List Methods In Dart. We will see a few of the most common ones you should know for your next app. We are going to learn how to use it in our next projects.



for():

Runs a function on every component in the list

void main() {
List<String> bikes = [
'Harley-Davidson',
'Royal Enfield Hunter',
'Yamaha R15 V4',
'Yezdi Roadster',
'KTM Duke 200 ',
'Bajaj Pulsar NS200',
];
for (var bike in bikes) {
print(bike);
}
}

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


map():

Produces another list in the wake of changing every component in a given list

void main() {
List<String> bikes = [
'Harley-Davidson',
'Royal Enfield Hunter',
'Yamaha R15 V4',
'Yezdi Roadster',
'KTM Duke 200 ',
'Bajaj Pulsar NS200',
];
List<String> myBikes = bikes.map((bike) => 'I want $bike').toList();

for (var bike in myBikes) {
print(bike);
}
}

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


contains():

Checks to affirm that the given component is in the list

void main() {
List<String> bikes = [
'Harley-Davidson',
'Royal Enfield Hunter',
'Yamaha R15 V4',
'Yezdi Roadster',
'KTM Duke 200 ',
'Bajaj Pulsar NS200',
];
String key = 'Harley-Davidson';
String bikekey = 'myBike';
print('bikes contains $key');
print(bikes.contains(key));
print('bikes contains $bikekey');
print(bikes.contains(bikekey));
}

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


sort():

Order the components in view of the gave ordering function

void main() {
List<String> bikes = [
'Harley-Davidson',
'Royal Enfield Hunter',
'Yamaha R15 V4',
'Yezdi Roadster',
'KTM Duke 200 ',
'Bajaj Pulsar NS200',
];
print('Before: $bikes');
bikes.sort((a, b) => a.compareTo(b));
print('After: $bikes');
}

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


reduce() & fold():

Compresses the components to a solitary value and utilizing the given function

void main() {
List<int> marks = [70, 50, 95];
int totalMarks = marks.reduce((curr, next) => curr + next);
print('totalMarks : $totalMarks');
int initialGraceMarks = 40;
int graceTotalMarks = marks.fold(initialGraceMarks, (curr, next) => curr + next);
print('graceTotalMarks : $graceTotalMarks');
}

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


every():

Affirms that each component fulfills the test

void main() {
List<Map> attendance = [
{
'name': 'Yash',
'totalAttendance': 75,
},
{
'name': 'Rakhi',
'totalAttendance': 68,
},
{
'name': 'Pragati',
'totalAttendance': 38,
},
];
int levelOne = 45;
bool passedOne = attendance.every((totalAttendance) => totalAttendance['totalAttendance'] > levelOne);
print('levelOne :$levelOne PASSED : $passedOne');
int levelTwo = 33;
bool passedTwo = attendance.every((totalAttendance) => totalAttendance['totalAttendance'] > levelTwo);
print('levelTwo :$levelTwo PASSED : $passedTwo');
}

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


where(), firstWhere() & singleWhere():

Returns a collection of components that fulfill a test. firstWhere() returns the first match in the list, while singleWhere() returns the first match given there is precisely one match.

void main() {
List<Map> attendance = [
{
'name': 'Yash',
'totalAttendance': 75,
},
{
'name': 'Rakhi',
'totalAttendance': 68,
},
{
'name': 'Pragati',
'totalAttendance': 38,
},
];
int levelOne = 45;
List<Map> levelOneResult = attendance.where(
(totalAttendance) => totalAttendance['totalAttendance'] > levelOne,
).toList();print('levelOne :$levelOne levelOneResult : $levelOneResult');Map result1 = attendance.firstWhere(
(totalAttendance) => totalAttendance['totalAttendance'] == 38,
);print('Result: $result1');Map result2 = attendance.singleWhere(
(totalAttendance) => totalAttendance['totalAttendance'] < 38,
orElse: () => null,
);print('Result: $result2');
}

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


List.from():

Makes another list from the given assortment

class StudentAttendance {
String name;
int totalAttendance;
StudentAttendance(this.name, this.totalAttendance);
factory StudentAttendance.fromMap(Map data) => StudentAttendance(
data['name'],
data['totalAttendance'],
);
@override
toString() {
return '$name : $totalAttendance';
}
}

void main() {
List<Map> attendance = [
{
'name': 'Yash',
'totalAttendance': 75,
},
{
'name': 'Rakhi',
'totalAttendance': 68,
},
{
'name': 'Pragati',
'totalAttendance': 38,
},
];
List<StudentAttendance> attendanceList = List.from(attendance.map((data) => StudentAttendance.fromMap(data)));
for (var data in attendanceList) {
print(data.toString());
}
}

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


Conclusion:

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

I hope this blog will provide you with sufficient information on Trying the Inbuild List Methods in your projectsWe will show you the most common Inbuild List Methods in your 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.


Input Chip In Flutter

0

There are a few chips characterized by Material Design, one of which is the input chip. Input chips are commonly used to address client input in a conservative structure or give ideas to the client. Besides label and avtar, an input chip can likewise have a delete icon. In Flutter, you can make that sort of chip utilizing the InputChip widget.

This blog will explore the Input Chip In Flutter. We perceive how to execute a demo program. We will learn how to use the Input Chip class in your flutter applications.

InputChip class – material library – Dart API
A material design input chip. Input chips represent a complex piece of information, such as an entity (person, place…api. flutter.dev

Table Of Contents::

Introduction

Constructor

Properties

Code Implement

Code File

Conclusion



Introduction:

InputChip is a material widget in a flutter that addresses a mind-boggling snippet of data in a conservative structure. Flutter gives a widget called InputChip which permits us to add an input chip to our application.

The input chip by default is disabled. We can empower it by setting onSelected. We can give a label, and leading and trailing symbols to it. Different kinds of chips are Chip, ChoiceChip, ActionChip, and FilterChip.

Demo Module ::

This demo video shows how to use the input chip in a flutter and shows how an input chip will work in your flutter applications. We will show a user press the chip, then the chip will be selected, and also the user will delete the chip. It will be shown on your devices.

Constructor:

To utilize InputChip, you need to call the constructor underneath:

To make an Input chip in the flutter we need to utilize the constructor of the InputChip class given by the flutter.

const InputChip({
Key? key,
this.avatar,
required this.label,
this.labelStyle,
this.labelPadding,
this.selected = false,
this.isEnabled = true,
this.onSelected,
this.deleteIcon,
this.onDeleted,
this.deleteIconColor,
this.deleteButtonTooltipMessage,
this.onPressed,
this.pressElevation,
this.disabledColor,
this.selectedColor,
this.tooltip,
this.side,
this.shape,
this.clipBehavior = Clip.none,
this.focusNode,
this.autofocus = false,
this.backgroundColor,
this.padding,
this.visualDensity,
this.materialTapTargetSize,
this.elevation,
this.shadowColor,
this.selectedShadowColor,
this.showCheckmark,
this.checkmarkColor,
this.avatarBorder = const CircleBorder(),
@Deprecated(
'Migrate to deleteButtonTooltipMessage. '
'This feature was deprecated after v2.10.0-0.3.pre.'
)
this.useDeleteButtonTooltip = true,
})

One required property for the InputChip widget is the label property. The label can be any widget generally a text widget. To utilize the InputChip widget we need to furnish this property with a value.

Properties:

There are some properties of InputChip are:

  • > selected — This property is utilized to set the chip’s state to be chosen or unselected. It takes a boolean value setting that truly will make the chip chosen and false will make the chip unselected.
  • > onSelected — This property is utilized to update the selected or unselected state of the Input chip and perform some actions when the chip is selected or unselected.
  • > isEnabled — This property is utilized to enable or disable the input chip. It takes a boolean value. By default the value is true. Regardless of whether we set this property to true, we need to set one of the callbacks onSelected, onDelete, or onPressed to enable the button.
  • > disabledcolor — This property is utilized to apply a color to the inputChip when the chip is disabled we will utilize this property. So to disable the button I’m eliminating every one of the callbacks.
  • > showCheckmark — This property is utilized to show/hide away the check mark that seems when we select the chip. It takes a boolean value.
  • > pressElevation — This property is utilized to change the amount of elevation we want to apply when we press the chip.

How to implement code in dart file :

You need to implement it in your code respectively:

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

First, we want an ItemModel class for holding the information of Inputchip. The ItemModel class will have three boundaries label, color, and isSelected. The label will hold the mark of the chip, the color will hold the backgroundColor and isSelected will hold the chosen or unselected condition of the Input chip.

import 'dart:ui';

class ItemModel {
String label;
Color color;
bool isSelected;

ItemModel(this.label, this.color, this.isSelected);
}

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

In the main. dart file, we will create a new class MyHomePage(). In this class, we will first create a List of types ItemModel and provide the data for chips.

final List<ItemModel> _chips = [
ItemModel("Android", Colors.green, false),
ItemModel("Flutter", Colors.blueGrey, false),
ItemModel("Ios", Colors.deepOrange, false),
ItemModel("Python", Colors.cyan, false),
ItemModel("React JS", Colors.teal, false),
];

In the body, we will add the Column widget. In this widget, we will add an image and wrap widget. In this widget, we will add direction was horizontal and its children were itemsChips() method.

Center(
child: Column(
children: [
Image.asset(
"assets/logo.png",
height: 300,
width: 350,
),
Wrap(direction: Axis.horizontal, children: itemsChips()),
],
)),

Now we will deeply define itemsChips() method are:

This method was on the list of widgets. We will add the InputChip widget. In this widget, we will add an avatar, label, backgroundColor, selected, onDeleted, onSelected, and then return chips.

List<Widget> itemsChips() {
List<Widget> chips = [];
for (int i = 0; i < _chips.length; i++) {
Widget item = Padding(
padding: const EdgeInsets.only(left: 10, right: 5),
child: InputChip(
avatar: CircleAvatar(
backgroundColor: Colors.white,
child: Text(_chips[i].label[0].toUpperCase()),
),
label: Text(_chips[i].label),
labelStyle: const TextStyle(color: Colors.white),
backgroundColor: _chips[i].color,
selected: _chips[i].isSelected,
onDeleted: () {
setState(() {
_chips.removeAt(i);
});
},
onSelected: (bool value) {
setState(() {
_chips[i].isSelected = value;
});
},
),
);
chips.add(item);
}
return chips;
}

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';
import 'package:flutter_input_chip_demo/item_model.dart';
import 'package:flutter_input_chip_demo/splash_screen.dart';

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

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

@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.red,
),
debugShowCheckedModeBanner: false,
home: const Splash(),
);
}
}

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

@override
_MyHomePageState createState() {
return _MyHomePageState();
}
}

class _MyHomePageState extends State<MyHomePage> {
final List<ItemModel> _chips = [
ItemModel("Android", Colors.green, false),
ItemModel("Flutter", Colors.blueGrey, false),
ItemModel("Ios", Colors.deepOrange, false),
ItemModel("Python", Colors.cyan, false),
ItemModel("React JS", Colors.teal, false),
];

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[200],
appBar: AppBar(
title: const Text("Flutter Input Chip Demo"),
centerTitle: true,
automaticallyImplyLeading: false,
backgroundColor: Colors.orangeAccent,
),
body: Center(
child: Column(
children: [
Image.asset(
"assets/logo.png",
height: 300,
width: 350,
),
Wrap(direction: Axis.horizontal, children: itemsChips()),
],
)),
);
}

List<Widget> itemsChips() {
List<Widget> chips = [];
for (int i = 0; i < _chips.length; i++) {
Widget item = Padding(
padding: const EdgeInsets.only(left: 10, right: 5),
child: InputChip(
avatar: CircleAvatar(
backgroundColor: Colors.white,
child: Text(_chips[i].label[0].toUpperCase()),
),
label: Text(_chips[i].label),
labelStyle: const TextStyle(color: Colors.white),
backgroundColor: _chips[i].color,
selected: _chips[i].isSelected,
onDeleted: () {
setState(() {
_chips.removeAt(i);
});
},
onSelected: (bool value) {
setState(() {
_chips[i].isSelected = value;
});
},
),
);
chips.add(item);
}
return chips;
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information on Trying the Input Chip in your flutter projectsWe will show you what the Introduction is and what are the construction and properties of the Input Chip, and make a demo program for working with Input Chip 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 you share what you’re working on using #FlutterDevs. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences.


Cupertino Popup Surface In Flutter

0

Cupertino is a bunch of Flutter Widgets supportive of carrying out an ongoing iOS plan. A CupertinoPopupSurface can be designed to paint or not paint a white variety on top of its obscured region. Typical use ought to paint white on top of the haze.

In any case, the white paint can be disabled to deliver divider holes for a more complicated design, e.g., CupertinoAlertDialog Widget. Moreover, the white paint can be disabled to deliver an obscured adjusted square shape with next to no variety like iOS’s volume control popup.

This article will explore the Cupertino Popup Surface In Flutter. We will see how to implement a demo program. We will learn how to use the Cupertino popup surface in flutter and also learn how to customize the CupertinoPopupSurface widget using different properties in your flutter applications.

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

Table Of Contents::

What is Cupertino Popup Surface?

Constructor

Properties

Code Implement

Code File

Conclusion



What is Cupertino Popup Surface?

Cupertino popup surface in flutter is only an ios-like popup surface or bottom sheet. CupertinoPopupSurface widget allows us to make a popup surface like ios. It is like the bottom sheet in android. A popup surface will show over the items on the screen.

This conduct will assist us with showing extra details on a similar screen without exploring another screen. When the popup surface seems like we can’t communicate with different parts of the screen.

We can excuse it by tapping outside the popup surface or by utilizing Navigator. pop(). For the most part, we will utilize popup surfaces in cases like altering data or sharing content, and so on.

Demo Module ::

This demo video shows how to use a Cupertino popup surface in a flutter and shows how a Cupertino popup surface will work in your flutter applications. We will show a popup over the content on the screen. It will be shown on your device.

Constructor:

To utilize CupertinoPopupSurface, you need to call the constructor underneath:

const CupertinoPopupSurface({
Key? key,
this.isSurfacePainted = true,
this.child,
})

We need to call the constructor of CupertinoPopupSurface class and give the necessary properties. The CupertinoPopupSurface widget has no necessary properties. Since it is a waste of time to show an empty popup surface we need to add the child.

Properties:

There are some properties of CupertinoPopupSurface are:

  • > key — This property is used to control if it should be replaced.
  • > isSurfacePainted — This property has utilized the choice of whether to paint a clear white on top of this surface’s obscured background. isSurfacePainted ought to be true for a regular popup that contains content with practically no dividers. A popup that requires dividers ought to set isSurfacePainted to false and afterward paint its surface region. Some pop-ups, similar to iOS’s volume control popup, decide to deliver an obscured region with practically no white paint covering it. To accomplish this impact, isSurfacePainted ought to be set to false.
  • > child — This property has been utilized to the widget below this widget in the tree. Child Property will have only one child. To allocate multiple users need to make use of the Row Widget or Column Widget and consider it.

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 the main. dart file, we will create a new class MyHomePage(). In this class, we will add the body part. In this body, we will add a Container widget with margin, width, height, and alignment. For its child, we will add crossAxisAlignment and mainAxisAlignment as the center.

Container(
margin: const EdgeInsets.all(30),
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.50,
alignment: Alignment.center,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/logo.png",
height: 300,
width: 350,
),
const SizedBox(height: 40,),
ElevatedButton(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.all(15),
textStyle: const TextStyle(
fontSize: 16,),
),
onPressed: () {
showPopup();
},
child: const Text("Show Cupertino Popup Surface"),
),
])),

We will add an image and an elevated button. In this button, we will add the onPressed method. In this method, we will add the showPopup() method. We will describe it below.

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

Output

Now, deeply describe the showPopup() method are:

In the showPopup() method, we will add showCupertinoModalPopup widget. In this widget, we will add context and a builder. In builder, we will return the CupertinoPopupSurface widget. In this widget, we will add isSurfacePainted was true.

void showPopup() {
showCupertinoModalPopup(
context: context,
builder: (BuildContext builder) {
return CupertinoPopupSurface(
isSurfacePainted: true,
child: Container(
padding: const EdgeInsetsDirectional.all(20),
color: CupertinoColors.white,
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).copyWith().size.height * 0.35,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.asset(
"assets/img.png",
height: 160,
width: 250,
),
const Material(
child: Text(
"Are You Flutter Developer?",
style: TextStyle(
color: CupertinoColors.black,
fontSize: 18,
),
)),
const SizedBox(height: 5,),

Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text("NO")),
ElevatedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text("YES")),
]),
],
)),
);
});
}

We will add the column widget. In this widget, we will add an image and text. Also, we will add a row widget on the same column. In this widget, we will add two ElevatedButton. When the user presses the button, then the popup show on your screen.

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/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cupertino_popup_surface_demo/splash_screen.dart';

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

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

@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blueGrey,
),
debugShowCheckedModeBanner: false,
home: const Splash(),
);
}
}

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

@override
_MyHomePageState createState() {
return _MyHomePageState();
}
}

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Flutter Cupertino Popup Surface Demo"),
automaticallyImplyLeading: false,
backgroundColor: Colors.blueGrey,
),
body: Container(
margin: const EdgeInsets.all(30),
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.50,
alignment: Alignment.center,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/logo.png",
height: 300,
width: 350,
),
const SizedBox(
height: 40,
),
ElevatedButton(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.all(15),
textStyle: const TextStyle(
fontSize: 16,
),
),
onPressed: () {
showPopup();
},
child: const Text("Show Cupertino Popup Surface"),
),
])),
);
}

void showPopup() {
showCupertinoModalPopup(
context: context,
builder: (BuildContext builder) {
return CupertinoPopupSurface(
isSurfacePainted: true,
child: Container(
padding: const EdgeInsetsDirectional.all(20),
color: CupertinoColors.white,
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).copyWith().size.height * 0.35,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.asset(
"assets/img.png",
height: 160,
width: 250,
),
const Material(
child: Text(
"Are You Flutter Developer?",
style: TextStyle(
color: CupertinoColors.black,
fontSize: 18,
),
)),
const SizedBox(
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text("NO")),
ElevatedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text("YES")),
]),
],
)),
);
});
}
}

Conclusion:

In the article, I have explained Cupertino Popup Surface’s basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Cupertino Popup Surface 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 Cupertino Popup Surface in your flutter projectsWe will show you what the Introduction is. Make a demo program for working with Cupertino Popup Surface and you’ve learned how to create & use Cupertino Popup Surface 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! 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.


Cupertino Search TextField In Flutter

0

Flutter’s Cupertino search textfield is similar to the searchTextfield in iOS. We might foster a searchTextField in an iOS way using a cupertinoSearchTextField widget. Its purpose is to show a text box where the user can enter his search terms. The system will return the results based on the user’s query when the request is submitted.

Cupertino is a set of Flutter Widgets that follow the iOS design. The purpose of these widgets is to coordinate iOS functionalities into flutter apps made for the iOS stage.

This article will explore the Cupertino Search TextField In Flutter. We will see how to implement a demo program. We will learn how to use the Cupertino search textfield in flutter and also learn how to customize the CupertinoSearchTextField widget using different properties in your flutter applications.

CupertinoSearchTextField class – cupertino library – Dart API
A CupertinoTextField that mimics the look and behavior of UIKit’s UISearchTextField. This control defaults to showing…api. flutter.dev

Table Of Contents::

Introduction

Constructor

Properties

Code Implement

Code File

Conclusion



Introduction:

Cupertino search textfield in flutter is ios style (like) searchTextfield. It is used to display a text field where the user can type his search question. At the point when the user submits the query, it will return the results based on the query. Naturally, the widget will display basic things like a search icon in the prefix, a placeholder (search), and a close symbol (‘x’) in the suffix.

Demo Module ::

This demo video shows how to create a Cupertino search textfield in a flutter and shows how a Cupertino search textfield will work in your flutter applications. We will show a text box where the user can enter his search terms. The system will return the results based on the user’s query when the request is submitted. It will be shown on your device.

Constructor:

To utilize CupertinoSearchTextField, you need to call the constructor underneath:

To make a Cupertino search textfield in flutter we need to call the constructor of CupertinoSearchTextField class and give the necessary properties. There are no required properties for the Cupertino search textfield.

const CupertinoSearchTextField({
Key? key,
this.controller,
this.onChanged,
this.onSubmitted,
this.style,
this.placeholder,
this.placeholderStyle,
this.decoration,
this.backgroundColor,
this.borderRadius,
this.padding = const EdgeInsetsDirectional.fromSTEB(3.8, 8, 5, 8),
this.itemColor = CupertinoColors.secondaryLabel,
this.itemSize = 20.0,
this.prefixInsets = const EdgeInsetsDirectional.fromSTEB(6, 0, 0, 4),
this.prefixIcon = const Icon(CupertinoIcons.search),
this.suffixInsets = const EdgeInsetsDirectional.fromSTEB(0, 0, 5, 2),
this.suffixIcon = const Icon(CupertinoIcons.xmark_circle_fill),
this.suffixMode = OverlayVisibilityMode.editing,
this.onSuffixTap,
this.restorationId,
this.focusNode,
this.autofocus = false,
this.onTap,
this.autocorrect = true,
this.enabled,
})

We can make one by straightforwardly calling the constructor. The constructor has a lot of features that assist in customizing the search text with handling.

Properties:

There are some properties of CupertinoSearchTextField are:

  • > onChanged — This property is used to accept a callback function that invokes each time the text of the textfield changes. We can get the changed text inside this function and use it as indicated by our needs. For instance, showing results coordinating or connected with the query.
  • > onSubmitted — This property is used to accept a callback function that invokes when the user presses the send button or submits the query. We can get the submitted text inside this function and use it as indicated by our needs.
  • > controller — This property is used to control the text that is being altered by the user. For instance, to display a search textfield with some text at first we can use the controller. Proclaim a controller and initialize it with some text.
  • > onTap — This property is used to accept a callback function as the value. This function will invoke when the user taps on the search textfield. We can finish our desired task inside this capability which will set off when the user taps on the textfield.
  • > enabled —This property is used to enable or disable the text field. Setting this property to true will enable and false will disable the search textfield. By default, it is true.
  • > autoCorrect — This property is used to take a boolean as a value. To enable auto-correction of the text entered by the user we have to set this property to true.
  • > autofocus — This property is used to take a boolean as a value. Setting this property to true will automatically focus the textfield and opens the keyboard to type.

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 the main. dart file, we will add a new class MyHomePage. In this class, we will add a TextEditingController.

TextEditingController controller =
TextEditingController(text: "test");

In the body, we will add the Padding widget. In this widget, we will add the CupertinoSearchTextField() widget. Inside the widget, we will add the controller, onChanged, onSubmitted, and autocorrect.

Padding(
padding: const EdgeInsets.all(14.0),
child: CupertinoSearchTextField(
controller: controller,
onChanged: (value) {},
onSubmitted: (value) {},
autocorrect: true,
),
),

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/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cupertino_search_textfield_demo/splash_screen.dart';

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

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

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

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

@override
_MyHomePageState createState() {
return _MyHomePageState();
}
}

class _MyHomePageState extends State<MyHomePage> {
TextEditingController controller =
TextEditingController(text: "test");

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Flutter Cupertino Search TextField Demo"),
automaticallyImplyLeading: false,
backgroundColor: Colors.blueGrey,
),
body: CupertinoPageScaffold(
backgroundColor: Colors.grey[200],
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 20,),
Image.asset(
"assets/logo.png",
height: 300,
width: 350,
),
const SizedBox(height: 30,),
Padding(
padding: const EdgeInsets.all(14.0),
child: CupertinoSearchTextField(
controller: controller,
onChanged: (value) {},
onSubmitted: (value) {},
autocorrect: true,
),
),
],
),
),
),
);
}
}

Conclusion:

In the article, I have explained Cupertino Search TextField’s basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Cupertino Search TextField 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 Cupertino Search TextField in your flutter projectsWe will show you what the Introduction is. Make a demo program for working with Cupertino Search TextField and you’ve learned how to create & use Cupertino search textfield 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! 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.


Parse And Display XML Data In Flutter

Like JSON, XML can be utilized to get information from a web server. Notwithstanding, JSON is an information exchange design and just gives an information encoding determination, while XML is a language that utilizes severe semantics to indicate custom markup languages and gives much more than information trade.

This article will explore the Parse And Display XML Data In Flutter. We will see how to implement a demo program. We will show you how to parse and display XML data using the xml package in your flutter applications.

xml | Dart Package
Dart XML is a lightweight library for parsing, traversing, querying, transforming, and building XML documents. This…pub.dev

Table Of Contents::

Introduction

Implementation

Code Implement

Code File

Conclusion



Introduction:

In general, JSON is quicker and more straightforward to utilize. All things considered, XML is all the more remarkable and can diminish programming risk in huge applications with rigid data structure prerequisites

To involve XML in Flutter, we really want to manage these means:

  • Get a XML record
  • Utilize the XML DOM to loop through the file
  • Extract values and store them in variables

We will show how to parse and display XML data in a flutter. It shows how XML data will work using the xml package in your flutter applications. It will be shown on your device.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies:
flutter:
sdk: flutter
xml: ^6.1.0

Step 2: Import

import 'package:xml/xml.dart' as xml;

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 main.dart inside the lib folder.

In the main.dart file. We will create a new class XmlDataDemo. In this class, we will add the list that will be displayed in the ListView and the variable name was _students ie equal to the angle bracket.

List _students = [];

We will create a _xmlData() method. in this method, we will create a final dataList is equal to the angle bracket. This demo renders a list of students in a fiction school, including their student names and attendance. The information is provided in XML format.

void _xmlData() async {
final dataList = [];

const studentXml = '''<?xml version="1.0"?>
<students>
<student>
<studentName>Yash</studentName>
<attendance>95</attendance>
</student>
<student>
<studentName>Aditya</studentName>
<attendance>80</attendance>
</student>
<student>
<studentName>Rakhi</studentName>
<attendance>85</attendance>
</student>
<student>
<studentName>Mohit</studentName>
<attendance>75</attendance>
</student>
<student>
<studentName>Shaiq</studentName>
<attendance>70</attendance>
</student>
<student>
<studentName>Pragati</studentName>
<attendance>65</attendance>
</student>
</students>''';

}

Then, we will parse the date XML data and update the UI while using the setState() function. In this function, we will add _students is equal to the dataList and add all things in the _xmlData() method.

  final document = xml.XmlDocument.parse(studentXml);
final studentsNode = document.findElements('students').first;
final students = studentsNode.findElements('student');
for (final student in students) {
final studentName = student.findElements('studentName').first.text;
final attendance = student.findElements('attendance').first.text;
dataList.add({'studentName': studentName, 'attendance': attendance});
}

setState(() {
_students = dataList;
});

Now, we will create an initState() method. In this method, we will call the _xmlData() function when the app starts.

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

In the body, we will add the ListView.builder() widget. In this widget, we will add the itemBuilder is navigate to the Card widget. In the card widget, we will add a key, margin, color, and elevation. Its child, we will add the ListTile widget. In this widget, we will add the title and subtitle. Also, we will add itemCount was_students.length.

ListView.builder(
itemBuilder: (context, index) => Card(
key: ValueKey(_students[index]['studentName']),
margin: const EdgeInsets.symmetric(vertical: 5, horizontal: 15),
color: Colors.teal.shade100,
elevation: 5,
child: ListTile(
title: Text(_students[index]['studentName']),
subtitle: Text("Attendance: ${_students[index]['attendance']}%"),
),
),
itemCount: _students.length,
),

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';
import 'package:flutter_xml_demo/splash_screen.dart';
import 'package:xml/xml.dart' as xml;

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

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

@override
Widget build(BuildContext context) {
return MaterialApp(
// Remove the debug banner
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const Splash(),
);
}
}

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

@override
State<XmlDataDemo> createState() => _XmlDataDemoState();
}

class _XmlDataDemoState extends State<XmlDataDemo> {
List _students = [];

void _xmlData() async {
final dataList = [];

const studentXml = '''<?xml version="1.0"?>
<students>
<student>
<studentName>Yash</studentName>
<attendance>95</attendance>
</student>
<student>
<studentName>Aditya</studentName>
<attendance>80</attendance>
</student>
<student>
<studentName>Rakhi</studentName>
<attendance>85</attendance>
</student>
<student>
<studentName>Mohit</studentName>
<attendance>75</attendance>
</student>
<student>
<studentName>Shaiq</studentName>
<attendance>70</attendance>
</student>
<student>
<studentName>Pragati</studentName>
<attendance>65</attendance>
</student>
</students>''';

final document = xml.XmlDocument.parse(studentXml);
final studentsNode = document.findElements('students').first;
final students = studentsNode.findElements('student');
for (final student in students) {
final studentName = student.findElements('studentName').first.text;
final attendance = student.findElements('attendance').first.text;
dataList.add({'studentName': studentName, 'attendance': attendance});
}

// Update the UI
setState(() {
_students = dataList;
});
}

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

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter XML Data Demo'),
centerTitle: true,
backgroundColor: Colors.cyan,
automaticallyImplyLeading: false,
),
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 20),
child: ListView.builder(
itemBuilder: (context, index) => Card(
key: ValueKey(_students[index]['studentName']),
margin: const EdgeInsets.symmetric(vertical: 5, horizontal: 15),
color: Colors.teal.shade100,
elevation: 5,
child: ListTile(
title: Text(_students[index]['studentName']),
subtitle: Text("Attendance: ${_students[index]['attendance']}%"),
),
),
itemCount: _students.length,
),
),
);
}
}

Conclusion:

In the article, I have explained XML Data’s basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to XML Data 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 Parse And Display XML Data in your flutter projectsWe will show you what the Introduction is. Make a demo program for working XML Data and you’ve learned how to parse and extract values from an XML document to present in a list view using the xml package in your flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire a flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! 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.


Composite Design Patterns for Dart & Flutter

0

The general design of the Composite example will be in a split second natural to Flutter developers since Flutter’s widgets are built with an extended form. Ordinary Flutter widgets, characterized as those that can have just a single child, and assortment Flutter widgets, described as those that take a rundown of youngsters, share a common point of interaction, permitting client code to deal with each much the same way.

With the Composite pattern, you can create part-whole hierarchies, tree structures in which individual objects and compositions of those objects can be treated uniformly.

This blog will explore Composite Design Patterns for Dart & Flutter. We will perceive how to execute a demo program. Learn how to build large, comprehensive systems from simpler, individual modules and components in your flutter applications.

Table Of Contents::

Introduction

Simple Composite Pattern

Conclusion



Introduction:

A composite pattern is a dividing configuration design. It portrays a gathering of objects that are treated in the same way as a single instance of a similar kind of object. The goal of a composite is to “compose” objects into tree designs to represent part-entire hierarchies. It permits you to have a tree structure and asks every hub in the tree construction to play out an undertaking.

Design patterns assist us with molding the connections between the objects and classes we make. These examples are focused on how classes inherit from one another, how objects can be made out of different items, and how objects and classes interrelate.

This pattern is ideal at whatever point you want to address a hierarchy of objects, for example, while you’re demonstrating a computer document framework. The fundamental parts of a record framework are documents and indexes, and directories can contain the two records and different registries.

You could utilize the Composite pattern to guarantee all of your record framework elements share a typical point of interaction, implying that documents and registries would have large numbers of similar highlights, however, each would do what’s fitting for its sort.

Simple Composite Pattern:

To show the Composite plan design with Dart, we’ll take a gander at an information model supporting generic data and containers, for example, for a bundle delivering the application. Data will have properties for their size and their height, and containers will likewise uphold those ascribes. Any container can contain two data and different containers:

class Data {
final double size;
final double height;
const Data(this.size, this.height);
}
class Container implements Data {
final List<Data> datas = [];
void addData(Data data) => datas.add(data);
double get size =>
datas.fold(0, (double sum, Item item) => sum + item.price);
double get height =>
datas.fold(0, (double sum, Item item) => sum + item.weight);
}

Data is a straightforward, immutable class that stores a data’s size and height.

The Container class executes the implied interface traded by Data, and that implies Container should give executions of the size and height getters from the Data class. Dart makes implied getters and setters for each factor and property that doesn’t have explicit accessors characterized.

In the case of final properties, no implicit setter is made, as these properties are safeguarded from reassignment after introduction. In this way, Container needs just characterize getters that match the Item API. The Container forms of size and height utilize the List class’fold() technique to return the absolute size and height of all things inside the container, as containers don’t have those credits themselves.

Since Container carries out the Data interface, it very well may be treated as Data, and it tends to be remembered for a List<Data> collection:

final container1 = Container()
..addData(Data(20.5, 2))
..addData(Data(10.25, 3.5))
..addData(Data(20, 1.5));
final container2 = Container()
..addData(Data(25.5, 12));
container1.addItem(container2);
print("Price: ${container1.price}");
print("Weight: ${container1.weight}");

Here, we make a container and add three pieces of data to it. Then, we make one more container with single data inside. Then we add the second container into the first, so the first container presently contains three data and a container. At the point when we print out the size and height of the first container, the outcome is a total of all sizes and heights contained there.

When we run the application, we ought to get the termial output like the underneath screen output.

Size: 76.25
Height: 19

Conclusion:

I hope this blog will provide you with sufficient information on Trying up the Composite Design Patterns for Dart & Flutter in your projectsIt tends to be exceptionally helpful to have the option to treat objects and collections of those objects the same way.

Client code doesn’t have to realize which it’s managing since the two of them uncover similar properties or potentially conduct. A tree of containers and data can undoubtedly be made and dealt a Composite pattern.

❤ ❤ 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 you share what you’re working on using #FlutterDevs. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences.


Explore CPU Profiler View In Flutter

0

At present, a larger part of the overall populace claims and uses cell phones and mobile technology for different capabilities routinely. With advanced technological upgrades, portable applications are easy-to-understand arrangements that give elite execution benefits, like a strong network for associations, and hearty handling power.

The best mobile applications additionally accompany a connection with UI, inferable from explicit arrangements that designers make during the application improvement process. One outstanding angle that Flutter devs focus on to guarantee strong application execution is the CPU profiler view.

This blog will Explore CPU Profiler View In Flutter. We will see how to implement a demo program. We are going to learn about how we can use it in your flutter applications.

Using the CPU profiler view
Note: The CPU profiler view works with Dart CLI and mobile apps only. Use Chrome DevTools to analyze the performance of a…docs. flutter.dev

Table Of Contents::

What is a CPU Profiler?

Recording Configurations for CPU Profiler View

How to Use the CPU Profiler?

Conclusion



What is a CPU Profiler?

It is helpful to upgrade the CPU utilization of a mobile application as far as getting a smoother and further developed client experience. The application would work quicker and lose a restricted battery, guaranteeing better execution.

The CPU profiler is answered innovation specialists use to break down and test the CPU use in an application cautiously. It estimates the real-time threat activity connected with the application UI and cooperating with it. Through the CPU profiler, it is feasible to assess and check explicit bits of knowledge like recorded capability follows, strategy follows, and framework follows.

Flutter developers focus on utilizing the CPU profiler view to record and afterward run Dart/Flutter-based session profiling.

The best specialists at organizations like Flutter Devs can precisely create top-caliber, and easy-to-use profile assembles that they use to study application execution. While the Flutter application works in profile mode, CPU profiles are appropriate for discharge execution assessment but not so much for some other sessions.

Recording Configurations for CPU Profiler View:

Through the CPU profiler view, it is feasible to see the records of collaboration-based details. The sort of data and its quality relies upon the kind of recording design that one picks.

Two primary varieties are accessible here.

> Method/Function Traces:

It is feasible to utilize these arrangements to separately take a look at all threads of the application’s CPU use and handling. One can gain subtleties through capability follows and the technique follows to check what systems and coding dialects are executed in the application for a particular time frame limit. Furthermore, with these follows, developers recognize the callees and callers.

The callee is the capability/strategy that another function or technique summons. Then again, the guest alludes to the strategy/capability that does the summoning activity. In this way, with these follows, it is feasible to comprehend which components add to the greater part of the application utilization load.

> System Traces:

This kind of recording setup gets fine-grained data connected with framework capabilities. Through these experiences, one can understand the collaborative quality of the application with accessible framework assets.

How to Use the CPU Profiler?

To work the CPU profiler, you can squeeze the record to start the said action. After finishing the recording succession, one can hit Stop. The information that is gathered using the VM is displayed in Call Tree, Bottom Up, and Flame Chart Profiler views.

> Call Tree Profiler View:

This kind of view features the CPU profile’s general technique following grouping. The table for the call tree view shows a hierarchical configuration for the profile. Thus, developers can tap on one technique to extend it and show all callees.

The fundamental elements here include:

  • > Self-time: This records the total time for the code execution done in this profile view.
  • > Total time: In this part, the general chance to execute the essential code and the callee-based code periods are recorded here.
  • > Source: It shows the main file path accessible for the strategy’s call site.
  • > Method: The called method name.

> Bottoms Up Profiler View:

The top specialists from any Flutter organization would focus on the bottom-up CPU profiler view to see the bottom-to-up portrayal table of the CPU profile. Here, all high-level strategies displayed on the table are the last call stack strategy for any CPU test. One more term for them is leaf nodes.

> Flame Chart Profiler View :

This profiler view design exhibits the CPU test portrayal for a particular time of the recording. It is exact to see the stack follow here in a hierarchical way. The stack outline at the top area conjures the stack outline under it.

Here, the width of a specific stack outline indicates the all-out season of CPU consumption of that stack outline. It is important to consider the stack approaches that take up a high measure of CPU time. It is a superior reference for really taking a look at any eminent performance upgrades.

doc.flutter.dev

Conclusion:

In the article, I have explained the CPU Profiler View basic structure in a flutter; you can modify this method according to your choice. This was a small introduction to CPU Profiler 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 the CPU Profiler View in your flutter projectsOverall, the CPU profiler view is crucial to the Flutter-based app performance analysis and processing. They carefully and quickly carry out the sequences, assuring top-notch results. 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.

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.


Cupertino Context Menu In Flutter

0

CupertinoContextMenu is a full-screen modular course that opens when the child is for quite some time squeezed. At the point when open, the CupertinoContextMenu shows the child, or the widget returned by previewBuilder whenever given, in an enormous full-screen Overlay with a list of buttons determined by activities. The child/preview is put in an Expanded Widget so it will develop to fill the Overlay assuming its size is unconstrained.

This blog will explore the Cupertino Context Menu In Flutter. We perceive how to execute a demo program. We are going to learn about how we can utilize CupertinoContextMenu and how to customize the style of Cupertino tabBar using various properties in your flutter applications.

CupertinoContextMenu class – cupertino library – Dart API
A full-screen modal route that opens when the child is long-pressed. When open, the CupertinoContextMenu shows the…api. flutter.dev

Table Of Contents::

Introduction

Constructor

Parameters

Code Implement

Code File

Conclusion



Introduction:

Cupertino context menu is a flutter used to show an ios style context menu or popup menu. It is additionally called an overflow menu. A CupertinoContextMenu widget shows a display that on lengthy press will show the context menu with activities for that child. It proves to be useful when we need to show more choices for a child in a little space.

We can excuse the menu in two ways. One is by tapping the background of the overlay that seems when the menu is shown. The subsequent technique is by utilizing the Navigator. pop capability inside onPressed callback of CupertinoMenuAction widget.

Demo Module ::

This demo video shows how to create a Cupertino context menu in a flutter and shows how a Cupertino context menu will work in your flutter applications. We will show an image on the screen. When the user tap on this image then, the menu will pop up. It will be shown on your device.

Constructor:

To utilize CupertinoContextMenu, you need to call the constructor underneath:

CupertinoContextMenu({
Key? key,
required this.actions,
required this.child,
this.previewBuilder,
})

To make a Cupertino setting menu in flutter we need to call the constructor of CupertinoContextMenu class and give the required properties. The Cupertino context menu has two required properties child and actions. The child acknowledges the widget as value. For actions, we can utilize any actions yet, for the most part, will utilize CupertinoContextMenuAction actions.

Properties:

There are some properties of CupertinoContextMenu are:

  • > child — This property is utilized to show a widget for which we will show our Cupertino setting menu. It accepts any widget as a value.
  • > actions — This property is used to show actions or items for our Cupertino setting menu. It will acknowledge a list of widgets as value. Be that as it may, by and large, we will involve CupertinoContextMenuAction widgets for this list.
  • > previewBuilder — This property is used in the Cupertino context menu that appears with a preview of the child when we long press the child. We will use this property if we want to change the look of the child that appears in the preview.

How to implement code in dart file :

You need to implement it in your code respectively:

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

We should make a model where we will execute the Cupertino context menu in a flutter. In this model, we will show a picture for which the context menu will show up. We will show the menu with three actions share, save to gallery, and delete. At the point when we long-press the picture, we will expand the picture size to fit the screen utilizing previewBuilder.

Center(
child: Container(
margin: const EdgeInsets.all(40),
width: double.infinity,
child:CupertinoContextMenu(
actions:[
CupertinoContextMenuAction(
onPressed: (){
Navigator.of(context).pop();
},
trailingIcon: CupertinoIcons.share,
child:const Text("Share"),
),
CupertinoContextMenuAction(
onPressed: (){
Navigator.of(context).pop();
},
trailingIcon: CupertinoIcons.down_arrow,
child:const Text("Save To Gallery"),
),
CupertinoContextMenuAction(
onPressed: (){
Navigator.of(context).pop();
},
isDestructiveAction: true,
trailingIcon: CupertinoIcons.delete,
child: const Text("Delete"),
)
],
child:Image.asset("assets/logo.png",),
),
),
)

Now, we will write a code for previewBuilder. It is increasing the image size when the image is in preview mode.

previewBuilder: (context, animation, child) {
return SizedBox(
height: double.infinity,
width: double.infinity,
child: Image.asset(
'assets/logo.png',
height: 200,width: 300,
),
);
},

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

Final Output

Code File:

import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cupertino_context_menu_demo/splash_screen.dart';

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

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

@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.pink,
),
debugShowCheckedModeBanner: false,
home: const Splash(),
);
}
}

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

@override
_MyHomePageState createState() {
return _MyHomePageState();
}
}

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Flutter Cupertino Context Menu Demo"),
centerTitle: true,
automaticallyImplyLeading: false,
),
body: Center(
child: Container(
margin: const EdgeInsets.all(40),
width: double.infinity,
child: CupertinoContextMenu(
actions: [
CupertinoContextMenuAction(
onPressed: () {
Navigator.of(context).pop();
},
trailingIcon: CupertinoIcons.share,
child: const Text("Share"),
),
CupertinoContextMenuAction(
onPressed: () {
Navigator.of(context).pop();
},
trailingIcon: CupertinoIcons.down_arrow,
child: const Text("Save To Gallery"),
),
CupertinoContextMenuAction(
onPressed: () {
Navigator.of(context).pop();
},
isDestructiveAction: true,
trailingIcon: CupertinoIcons.delete,
child: const Text("Delete"),
)
],
previewBuilder: (context, animation, child) {
return SizedBox(
height: double.infinity,
width: double.infinity,
child: Image.asset(
'assets/logo.png',
height: 200,
width: 300,
),
);
},
child: Image.asset(
"assets/logo.png",
),
),
),
));
}
}

Conclusion:

In the article, I have explained the Cupertino Context Menu basic structure in a flutter; you can modify this code according to your choice. This was a small introduction to Cupertino Context Menu 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 Cupertino Context Menu in your flutter projectsWe will show you what the Introduction is and what are the construction and properties of the Cupertino Context Menu, and make a demo program for working with Cupertino Context Menu 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! For any flutter-related queries, you can connect with us on FacebookGitHubTwitter, 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.