Google search engine
Home Blog Page 56

CupertinoActionSheet In Flutter

0

All mobile applications delivering some common characteristic. One quite obvious behavior is to provide users to make decisions or choose options, while needed. To achieve this we’ve some pre-built functionality.

Hello Guys, In this tutorial, we’ll learn about how to implement CupertinoActionSheet in Flutter.


Table of Contents :

Introduction

Setup

Code Implementation

Code File

Conclusion


Introduction:

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. Using Flutter we can build

If you want to explore more about Flutter, please visit Flutter’s official website to get more information.

CupertinoActionSheet

According to flutter doc, An action sheet is a specific style of alert that presents the user with a set of two or more choices related to the current context. To build an ios-style app to present the list option we’ll use CupertinoActionSheet.

Setup:

First of all, we have to import the Cupertino package into our dart file.

import 'package:flutter/cupertino.dart;

CupertinoActionSheet is an ios-themed widget that has action sheets design specifications. An action sheet can have a title, an additional message, and a list of actions. To display action buttons that look like standard iOS action sheet buttons, provide CupertinoActionSheetActions for the actions given to this action sheet.

To include an iOS-style cancel button separate from the other buttons, provide a CupertinoActionSheetAction for the cancelButton given to this action sheet. An action sheet is typically passed as the child widget to showCupertinoModalPopup, which displays the action sheet by sliding it up from the bottom of the screen.

Constructors:

CupertinoActionSheet({Key? key,
Widget? title,
Widget? message,
List<Widget>? actions,
ScrollController? messageScrollController,
ScrollController? actionScrollController,
Widget? cancelButton})

Properties:

  1. actions-> List<Widgets>: The set of actions that are displayed for the user to select.
  2. actionScrollControllerScrollController: A scroll controller that can be used to control the scrolling of the actions in the action sheet
  3. cancelButton → Widget: The optional cancel button that is grouped separately from the other actions
  4. message → Widget: An optional descriptive message that provides more details about the reason for the alert.
  5. title → Widget: An optional title of the action sheet. When the message is non-null, the font of the title is bold.

Code implementation:

In this snippet on click of a button, we’ve added CupertinoActionSheet. We can use it anywhere in the class.

showCupertinoModalPop

showCupertinoModalPopup(
context: context,
builder: (BuildContext context) => CupertinoActionSheet());

Now added title, message, actions, and cancelButton. These are the properties.

To show particular option item in action we used CupertinoActionSheetAction() widget.

CupertinoActionSheetAction(
child: const Text('Option 1'),
onPressed: () {
//do some action
}
);

Code file

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

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

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: HomePage(),
);
}
}

class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("CupertinoActionSheet"),
),
body: Center(
child: ElevatedButton(
onPressed: () {
final action = CupertinoActionSheet(
title: Text(
"Flutter dev",
style: TextStyle(fontSize: 30),
),
message: Text(
"Select any action ",
style: TextStyle(fontSize: 15.0),
),
actions: <Widget>[
CupertinoActionSheetAction(
child: Text("Action 1"),
isDefaultAction: true,
onPressed: () {
print("Action 1 is been clicked");
},
),
CupertinoActionSheetAction(
child: Text("Action 2"),
isDestructiveAction: true,
onPressed: () {
print("Action 2 is been clicked");
},
)
],
cancelButton: CupertinoActionSheetAction(
child: Text("Cancel"),
onPressed: () {
Navigator.pop(context);
},
),
);

showCupertinoModalPopup(
context: context, builder: (context) => action);
},
child: Text("Click me "),
),
),
);
}
}

Output

Conclusion:

In this article, I have explained the CupertinoActionSheet widget demo, which you can modify and experiment with according to your own. This little introduction was about showing an ios-styled theme in the app.

I hope this blog will provide you with sufficient information in trying up CupertinoActionSheet Widgets in your Flutter projects. 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 Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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


Inherited Widget In Flutter

0

Flutter has made it quite easy to develop complex UIs for developers. Pulsation automated testing empowers you to meet high responsiveness in your application as it helps in discovering bugs and various issues in your application. Pulsation is a tool for developing mobile, desktop, web applications with a code & is a free and open-source tool.

Hello friends, I will talk about my new blog on Inherited Widget In Flutter. We will also implement a demo of the Inherited Widget, and describes its properties, and how to use them in your flutter applications. So let’s get started.


Table Of Contents :

Inherited Widget

Attributes

Code Implement

Code File

Conclusion


Inherited Widget :

In flutter, the inherited widget is a base class that allows those classes to extend the information under the tree from it. Inherited widgets are also a kind of state management technique. It works by telling registered build references when a change occurs. However, it adds interoperability to any app in a secure way, but when doing so it can Re-create each widget atop the tree.

Demo Module :

Attributes

Let’s talk about some main constructors of Inherited Widget.

const InheritedWidget({
Key? key, required Widget child
})
: super(key: key, child: child);

child: We use the child property to use widgets like row, column stack, etc. so that we can exclude many children.

key: The key property is a one-of-a-kind parameter. Basically, every widget creator can be found if the two widget’s runtime type and key property are is equal respectively, then the new widget updates the old widget by calling it the underlying element. Otherwise, the old element is updated. The tree is removed from the tree, the new widget is converted to an element, and the new element is inserted into the tree.

Code Implementation:

You need to implement it in your code respectively:

Create a new dart file calledcount_state_demo inside the lib folder.

Before using the Inherited widget we have created a class named Constant that extends the Inherited widget It overrides the updateShouldNotify method used to get the closest widget to the information from the given BuildContext.

class CountState extends InheritedWidget {

final int count;
final Widget child;
final Function addCounter;
final Function removeCounter;

CountState({Key key, this.count,this.child, this.addCounter,this.removeCounter})
: super(key: key, child: child);

static CountState of(BuildContext context) {
return (context.dependOnInheritedWidgetOfExactType<CountState>());
}

@override
bool updateShouldNotify(CountState oldWidget) {
//return true;
return count != oldWidget.count;
}
}

This method has to be canceled before the inherited widget can be overridden updateShouldNotify method. This method has been used so that the widget received from this widget must be notified or not. It is of type Boolean and accepts a parameter that Is similar to a square

@override
bool updateShouldNotify(CountState oldWidget) {
//return true;
return count != oldWidget.count;
}

Now we will initialize the count state in the RootWidget class and initialize the addCounter and removeCounter functions, then we will define the InheritedWidgeDemo class which will display the value of the counter which has two buttons that will be clicked on and add value and remove value.

return CountState(
count: count,
addCounter: addCounter,
removeCounter: removeCounter,
child: InheritedWidgetDemo(),
);

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_inherited_widget_demo/view/count_state.dart';

class RootWidget extends StatefulWidget {
@override
_RootWidgetState createState() => _RootWidgetState();
}

class _RootWidgetState extends State<RootWidget> {
int count = 0;
void addCounter() {
setState(() {
count++;
});
}

void removeCounter() {
setState(() {
if(count>0){
count--;
}
});
}

@override
Widget build(BuildContext context) {
return CountState(
count: count,
addCounter: addCounter,
removeCounter: removeCounter,
child: InheritedWidgetDemo(),
);
}
}

class InheritedWidgetDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
final counterState = CountState.of(context);
return Scaffold(
appBar: AppBar(
backgroundColor:Colors.blue,
title: Text(
'Counter Inherited Widget Demo',
style: TextStyle(color: Colors.white),
),
),

body: Column(
mainAxisAlignment:MainAxisAlignment.spaceEvenly,
children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child:Text('Items add & remove: ${counterState.count}',
style: TextStyle(fontSize: 20),
),
),

Row(
mainAxisAlignment:MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Align(
alignment: Alignment.bottomLeft,
child: new FloatingActionButton(
onPressed: counterState.removeCounter,
child: new Icon(
Icons.remove,
color: Colors.white,
),
),
),
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Align(
alignment: Alignment.bottomCenter,
child: new FloatingActionButton(
onPressed: counterState.addCounter,
child: new Icon(
Icons.add,
color: Colors.white,
),
),
),
),
],
),
],
),
);
}
}

Conclusion:

In this article, I have explained an Inherited Widget in a flutter, which you can modify and experiment with according to your own, this little introduction was from the Inherited Widget demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Inherited Widget in your flutter project. We showed you what the Inherited Widget is and work on it 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 Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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

Wall Layout In Flutter

In this article, we will explore the Wall Layout In flutter using the wall_layout_package. With the help of the package, we can easily achieve the flutter Wall Layout. So let’s get started.

flutter_wall_layout | Flutter Package
This library provides a unique widget, WallLayout, rendering into a list of children having different shapes. There is two…pub.dev


Table of Contents :

Flutter

Wall Layout

Implementation 

Code Implementation

Code File

Conclusion


Flutter :

“ Flutter is Google’s UI toolkit that helps you build beautiful and natively combined applications for mobile, web, and desktop in a single codebase in record time, Flutter offers great developer tools, with amazing hot reload”

Wall Layout :

If you want to display a few elements in a specific way without scroll, you may not need WallLayout, and you should look at Stack, Row, Column, Expanded widgets. They may be easier to handle.

Wall Layout advantages are best shown on a big set of rectangle widgets having different sizes. It may appear interesting for a few uses, but you may keep your code as simple as possible, isn’t it?.

Demo Module :

Implementation :

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies :dependencies:
flutter_wall_layout: ^1.0.0

Step 2: Importing

import 'package:flutter_wall_layout/flutter_wall_layout.dart';

Step 3: Run flutter package get

Code Implementation :

Create a new dart file called image_wall_layout_demo.dart inside the libfolder.

Before creating the wall layout, we have created a list of an image and defined the image list data in the _createPicture() method, and initialized the image list to initState().

List<_MyPictureData> _picturesData;@override
void initState() {
super.initState();
_animationController = AnimationController(duration: Duration(milliseconds: 2000), vsync: this);
_picturesData = _createPicturesData();
_animationController.forward(from: 0.0);
}

Now we will take the WallLayout widget inside which to use its properties. Inside the WallLayout, we have defined the _buildList() method in the stones() property, inside which we used the animation which will animate our image and tap again on the refresh icon in the app bar. Refresh the image and display it.

WallLayout(
stones: _buildList(),
layersCount: 3,
stonePadding: 12.0,
),

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_wall_layout/flutter_wall_layout.dart';
import 'dart:math';

class ImageWallLayout extends StatefulWidget {
@override
_ImageWallLayoutState createState() => _ImageWallLayoutState();
}

class _ImageWallLayoutState extends State<ImageWallLayout>
with TickerProviderStateMixin {
AnimationController _animationController;
List<_MyPictureData> _picturesData;

@override
void initState() {
super.initState();
_animationController = AnimationController(
duration: Duration(milliseconds: 2000), vsync: this);
_picturesData = _createPicturesData();
_animationController.forward(from: 0.0);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
title: Text(
"Wall Layout Demo",
style: TextStyle(color: Colors.black),
),
centerTitle: true,
// leading: IconButton(icon: Icon(Icons.swap_horizontal_circle), onPressed: __swapLayout,),
actions: [
IconButton(
icon: Icon(
Icons.replay,
color: Colors.black,
),
onPressed: __replayAnimation)
],
),
body: WallLayout(
stones: _buildList(),
layersCount: 3,
stonePadding: 12.0,
),
);
}

void __swapLayout() {
Navigator.of(context).popAndPushNamed("usecase2");
}

void __replayAnimation() {
_animationController.forward(from: 0.0);
setState(() {});
}

List<_MyPictureData> _createPicturesData() {
final data = [
{"name": "assets/images/resort_1.jpg", "width": 1, "height": 1},
{"name": "assets/images/resort_2.jpg", "width": 2, "height": 1},
{"name": "assets/images/resort_3.jpg", "width": 1, "height": 2},
{"name": "assets/images/resort_4.jpg", "width": 1, "height": 1},
{"name": "assets/images/resort_1.jpg", "width": 2, "height": 2},
{"name": "assets/images/resort_2.jpg", "width": 1, "height": 1},
{"name": "assets/images/resort_3.jpg", "width": 1, "height": 1},
{"name": "assets/images/resort_1.jpg", "width": 2, "height": 1},
{"name": "assets/images/resort_2.jpg", "width": 1, "height": 2},
{"name": "assets/images/resort_3.jpg", "width": 2, "height": 2},
{"name": "assets/images/resort_4.jpg", "width": 1, "height": 1},
{"name": "assets/images/resort_1.jpg", "width": 3, "height": 1},
];
double length = data.length.toDouble();
final firstEnd = 0.35;
return data.map((d) {
final isFirst = data.indexOf(d) == 0;
double pos = data.indexOf(d).toDouble();
return _MyPictureData(
name: d["name"],
width: d["width"],
height: d["height"],
animatable: CurveTween(
curve: Interval(
isFirst ? 0.0 : (firstEnd + (pos / length) * (1.0 - firstEnd)),
isFirst
? firstEnd
: min(1.0,
firstEnd + ((pos + 1.0) / length) * (1.0 - firstEnd)),
curve: isFirst ? Curves.elasticOut : Curves.easeOutBack,
),
));
}).toList();
}

List<Stone> _buildList() {
return _picturesData.map((d) {
return Stone(
id: _picturesData.indexOf(d),
width: d.width,
height: d.height,
child: ScaleTransition(
scale: d.animatable.animate(_animationController),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(d.name),
),
),
),
),
);
}).toList();
}
}

class _MyPictureData {
final String name;
final int width;
final int height;
final Animatable animatable;

_MyPictureData({this.name, this.width, this.height, this.animatable});
}

Conclusion:

In this flutter article, I have explained a Wall Layout in a flutter, which you can modify and experiment with according to your own, this little introduction was from the Feature Wall Layout demo from our side.

I hope this blog will provide you with sufficient information on Trying up the Wall Layout in your flutter project. We will show you the Wall Layout is?, and work on it 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 Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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

Top 10 Flutter Companies in USA

0

Flutter, an open-source UI software development toolkit made by Google, has become a foundation for versatile mobile application development. Eminent for its flexibility, Flutter empowers developers to build locally compiled applications for mobile, web, and desktop stages utilizing a single codebase.

Flutter, Google’s open-source UI tool stash, is liked for cross-stage application development because of its widget-based architecture, pre-planned widgets, receptive system, and hot reload choice.

This article will explore the Top 10 Flutter Companies in US. This compilation reveals the foremost 10 flutter app development firms, ideal for elevating your project. As mobile technology continues to evolve at a breakneck pace, the right app can significantly enhance business operations, customer engagement, and overall market presence. Here’s a brief overview of the top 10 Flutter application development companies!

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.



Introduction:

In a period where digital arrangements drive business development, distinguishing the Top 10+ Flutter Application Development Organizations in 2024 has become essential for business visionaries and organizations planning to enhance and catch their market. After exploring 100 flutter application development organizations in the USA, we presume that The mobile application development industry in the US has seen an uncommon flood in development and development throughout recent years.

In 2024, this area will remain at the cutting edge of technological headway, driven by a steady push toward digital change across all businesses. With the expansion of cell phones and the rising dependence on mobile technology for individual and expert use.

These companies are not simply developers; they are creative issue solvers with a demonstrated history of changing thoughts into engaging in, utilitarian, and solid application encounters. As we enter 2024, the interest in strong and outwardly engaging Flutter applications keeps taking off, highlighting the meaning of picking the right advancement accomplice. To help you explore this unique market, we’ve organized a list of the main 10 Flutter Application Development Companies in the USA for 2024.

Importance Of Choosing The Right Flutter App Development Company in the US

Picking the right Flutter application development organization is critical for the progress of your project in the competitive scene of 2024. Here’s the reason:

  • Expertise Matters
  • Efficient Cross-Platform Development:
  • Innovative Design
  • Cost-Effectiveness and Transparency:
  • Timely Delivery
  • Scalability and Future-Proofing
  • Robust Testing
  • Post-Launch Support

Key Elements While Choosing a Flutter Application Improvement Organization in the US

While choosing to engage in a Flutter application development company, it’s fundamental to consider the accompanying key elements:

  • Experience and Capability — Search out companies with a demonstrated history in Flutter application development and important industry mastery.
  • Portfolio Assessment — Analyze the company’s portfolio to evaluate the type and variety of its past Flutter projects.
  • Client Feedback — Investigate client surveys and tributes to measure the fulfillment levels of past clients.
  • Development Cycles — Figure out the company’s development techniques, including their way of dealing with project executives, correspondence conventions, and quality affirmation measures.
  • Cost and Monetary Arrangement — Examine the undertaking’s spending project’s budget and valuing model to guarantee concordance with your monetary assets.
  • Correspondence and Cooperation Practices — Viable communication is vital for project achievement. Decide on a company that values straightforward and customary communication, giving reliable reports on project progress.
  • Support and Maintenance Services: — Ask about the company’s post-send-off help and support contributions. A reliable accomplice will offer continuous help to resolve any issues and execute important updates.
  • Innovation Use — Affirm that the company consolidates the most recent technologies and tools in its development cycle to convey a cutting-edge and proficient application.
  • Adaptability Affirmation — Consider the company’s capacity to scale the development team whenever required, especially for bigger and more complex tasks.
  • Lawful and Security Consistence — Confirm that the company complies with legitimate and security principles, incorporating consistency with information insurance guidelines and industry-explicit necessities.

Top 10 Flutter App Development Companies in the US

1.  Zco Corporation

Zco Corporation has been recognized as a premier provider of Flutter app development services, extending its expertise to clients across diverse industries. Their methodology towards app development encompassed a holistic approach, ensuring that every aspect from conceptualization to deployment was meticulously executed. With a dedicated team of developers proficient in Flutter, they navigated through complex challenges with finesse, delivering solutions that surpassed client expectations.

As premier Flutter app development companies in USA, their unwavering dedication to excellence and innovation distinguishes them from the competition, positioning them as the preferred choice for businesses needing top-tier mobile applications.

  • Founding Year: 1989
  • Employees: 750+
  • Hourly Rate: $26 — $50 / hour ( Depend on Developer Experience )
  • Key Services: Flutter App Development, Mobile App Development, Website Development, Custom Software Development, UI/UX, Cross Platform App Development,
  • Industries Served: Healthcare, Retail, E-commerce, Travel, Financial Services, and more
  • Global Reach: Offices Located in the USA
  • Technology Focus: Expertise in the latest technologies like AI, IoT, Blockchain, Android, iOS, and Flutter.
  • Commitment to Quality: Emphasis on delivering high-quality, scalable solutions

2. GetWidget

GetWidget is an open-source Flutter UI library offering a scope of pre-built UI parts that essentially lessen application development time. Widgets structure the core of Flutter applications, and GetWidget offers more than 100 delightfully planned parts, working with rapid, top-notch application creation.

They give UI kits, layouts, and a broad scope of bundles and libraries under the Apache 2.0 permit, taking special care of designers around the world. The stage likewise offers free Flutter applications and exhaustive tutorials for fledglings, making it a significant asset for all degrees of developers.

  • Founding Year: 2017
  • Employees: 50+
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Flutter App Development, Flutter Design
  • Industries Served: Grocery, Food Delivery, and Home Services.
  • Global Reach: Offices Located in the USA,
  • Technology Focus: Expertise in the Flutter Tech.
  • Commitment to Quality: All Flutter Solutions on One Platform

3. Uptech

Uptech is an exhaustive flutter development organization known for transforming thoughts into fruitful items with a client-focused approach. Their services span from the discovery stage, where they direct client examination and model thoughts, to UX/UI plan and mobile development.

They take care of enterprises, for example, fintech, medical services, and on-demand delivery, and the sky is the limit from there, guaranteeing every application is quick, secure, and easy to understand. Uptech is commended for its straightforward cycles, social obligation, and uncommon plan and security principles, making it a strongly suggested accomplice for development needs.

  • Founding Year: 2016
  • Employees: 90
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Flutter App Development, Mobile App and Software Development
  • Industries Served: Fintech, Social Media, and more.
  • Global Reach: Offices Located in the USA, Poland, Estonia
  • Technology Focus: Flutter, React Native, Android and iOS.
  • Commitment to Quality: We don’t have to deal with bugs and problems with the code.

4. inVerita

inVerita is an expert Flutter application development firm supporting the advantages of Flutter’s native performance, cost viability, and connecting with client experience. They feature Flutter’s benefits, including quick turn of events, expressive and adaptable UI, and a solitary codebase for iOS and Android development.

The organization brags a group of prepared experts conveying strong and customized Flutter application development, progressing upkeep, and backing. They underline fast market portrayal, consistent client care, and competitive estimating, settling on them a convincing decision for Flutter application development administrations.

  • Founding Year: 2015
  • Employees: 50–249
  • Hourly Rate: $50 — $99 / hr
  • Key Services: Flutter App Development, Mobile App, and Cloud and DevOps.
  • Industries Served: Fintech, Healthcare, Logistics.
  • Global Reach: Offices Located in the USA, Ukraine, Poland
  • Technology Focus: Flutter, AWS, Azure and More.
  • Commitment to Quality: Extending Your Team With Right People.

5. VoxturrLabs

VoxturrLabs is a conspicuous Flutter application development organization offering start-to-finish answers for mobile, desktop, and wearable applications. They stress conveying showcasing prepared, versatile, secure, and future-confirmation innovation. Their tech-forward approach incorporates native and cross-stage application development, client-focused UI/UX plans, application remaking and relocation, and on-request developers.

With an emphasis on big business versatility arrangements, they guarantee workers can get to assets safely from any place. They value key, business-first methodologies, opportune conveyance, standard updates, straightforwardness, spending plan cordial administrations, and thorough documentation for project management.

  • Founding Year: 2018
  • Employees: 20+
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Flutter App Development, MVP, UI/UX, and More.
  • Industries Served: Retail, Government, Fitness.
  • Global Reach: Offices Located in the USA
  • Technology Focus: Flutter, Android, iOS.
  • Commitment to Quality: Building brands is our Passion, and Optimizing businesses is our Nature.

6. Flutter Devs

FlutterDevs is a protruding flutter app development company with an extensive in-house team of 30+ seasoned professionals who know exactly what you need to strengthen your business across various dimensions. With more than 10+ years of experience in mobile applications, we know your needs very well.

  • Founding Year: 2015
  • Employees: 30+
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Flutter App Development.
  • Industries Served: NIC, SpiceJet, SBI and More.
  • Global Reach: Offices Located in the USA
  • Technology Focus: Flutter, Android, iOS, WordPress and more.
  • Commitment to Quality: Fastest Growing Companies Optimize, Evolve, And Innovate With Successive.

7. Carmatec

Carmatec offers extensive Flutter application development services, utilizing its high-level cross-stage application advancement system for predominant quality applications. They center around conveying single code structure answers for iOS and Android, which improves the speed and proficiency of advancement and testing.

Their team works in making dynamic and complex application stages utilizing Flutter, guaranteeing a quicker experience for clients and simple flexibility for developers. Picking Carmatec implies settling on a custom and innovative development process, cross-industry experience, a team of Flutter-trained professionals, and continuous help and maintenance.

  • Founding Year: 2003
  • Employees: 500+
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Software Development, Flutter, and Mobile App Development.
  • Industries Served: Retail, Telecom, Media and More.
  • Global Reach: Offices Located in the USA, Qatar, UAE and India
  • Technology Focus: Flutter, PHP, AI, AR/VR, WordPress and more.
  • Commitment to Quality: Comprehensive Software Engineering Capabilities at Your Fingertips.

8. Codigee

Codigee has practical experience in mobile application development, utilizing cross-stage advances like Flutter to convey far-reaching arrangements custom-made for Android and iOS. They focus on web and desktop development, using the furthest down-the-line advances to convey top-level items.

Also, Codigee offers mobile application update administrations to upgrade plans, client experience, and execution, including UX reviews and execution improvement administrations. Their team expansion administrations give talented experts across different spaces, including improvement, QA, and UX, to expand your group and speed up your task’s prosperity.

  • Founding Year: 2018
  • Employees: 10–49
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Mobile App Development, Web Development, and App Upgrade.
  • Industries Served: Fitness, Sports, and Food.
  • Global Reach: Offices Located in the USA
  • Technology Focus: Flutter, Swift, and Reactjs.
  • Commitment to Quality: LET’S MAKE SOMETHING TOGETHER.

9. Skynet Technologies

Skynet Technologies offers an extensive set-up of Flutter application development services, zeroing in on conveying expressive, adaptable, and robust applications. They spend significant time in cross-stage application advancement, custom UI/UX plans, widget development, undertaking arrangements, custom application development, and careful application testing and observing.

They give fitted answers for new companies to huge enterprises with adaptable recruiting models. Also, they offer association projects and support administrations to guarantee applications stay up-to-date and productive. Their obligati administrationson to consumer loyalty and cost-saving procedures makes them a solid accomplice in Flutter application development.

  • Founding Year: 2002
  • Employees: 50–249
  • Hourly Rate: $50 — $99 / hr
  • Key Services: Mobile App Development, Web Development, and Web Design.
  • Industries Served: Dental.
  • Global Reach: Offices Located in the USA
  • Technology Focus: Flutter, Python, Java, Android and iOS.
  • Commitment to Quality: We bring not just a one-time solution, but a long-term commitment and relationship.

10. SayOne Technologies

SayOne Technologies is a presumed Flutter development company that uses the cross-stage capacities of Flutter to make native-like, great applications rapidly and proficiently. They feature key advantages of Flutter including quick and straightforward application development, cross-stage capacity, a huge steady community, astonishing widgets, and adaptability in games and IoT application development.

SayOne follows an Agile strategy to guarantee a smooth plan, improvement, and QA process, offering highlight-rich, secure, and versatile arrangements. Their methodology means to save time and expenses while conveying first-class applications custom-fitted to different business needs.

  • Founding Year: 2011
  • Employees: 50–249
  • Hourly Rate: $25 — $49 / hr
  • Key Services: Mobile App Development, Web Application.
  • Industries Served: Furniture, E-Commerce, Education.
  • Global Reach: Offices Located in the USA
  • Technology Focus: Flutter, Python, Java, Android and iOS.
  • Commitment to Quality: We collaborate with visionary leaders on projects that focus on quality and require the expertise of a highly skilled and experienced team.

Conclusion:

In the article, I have explained the Top 10 Flutter Companies in US; you can modify this code according to your choice. This was a small introduction to the Top 10 Flutter Companies in US user Interaction from my side, and it’s working using Flutter.

I hope this blog will provide you with sufficient information on Trying the Top 10 Flutter Companies in the US. The top 10 Flutter app development companies listed stand out for their unique strengths, ranging from customized application development and open-source UI libraries to end-to-end solutions for mobile, desktop, and wearable applications.

❤ ❤ Thanks for reading this article ❤❤

Do I need to correct something? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

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

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


Debugging In Flutter

0

Flutter is an open-source User Interface SDK that is Software Development Kit. Flutter is an open-source project, and it is maintained by Google. Currently, in March 2021. Google has been released another new version of flutter that is Flutter 2. Flutter as a software development kit is great, but while building a big application it is evident that there will be some problems or bugs in the code which has to be debugged. Flutter provides multiple debugging tools such as timeline inspector, memory and performance inspector, and else. These tools ease up the debugging process for a developer, below are listed different tools for debugging flutter apps.

Hello friends, I will talk about my new blog on Debugging In Flutter. We will also implement a demo of the Debugging In Flutter, and describes its properties, and how to use them in your flutter applications. So let’s get started.


Table Of Contents :

Flutter Debugging

Code Implement

Code File

Conclusion


Flutter Debugging :

Flutter has a wide range of devices and features to help debug applications. The following equipment and facilities are displayed.

  1. DevTools: DevTools for debugging app this may be the first tool. It is a suite of performance and profiling tools run on a browser.
  2. Logging: Logging view widget Inspector working in DevTools and also indirectly from the Android Studio & IntelliJ. The inspector allows checking the visual representation of widget trees.
  3. Debug flags: Debug Flags provides us with a variety of debug flags and functions to debug your app at various points. To use these features we need to compile in debug mode.

Code Implement :

You need to implement it in your code respectively:

As we will discuss here the debug flag and some of its functions.So let’s get started.

First, we need to import rendering the dart from the flutter.

import 'package:flutter/rendering.dart';

debugPaintSizeEnabled:

This screen uses the paint size embed function which is of type, it creates a render box around the screen which highlights the box with some colors and by drawing a thick line on the side of the box.

Let us understand this with the help of a reference.

debugPaintSizeEnabled = true;

When the app is debugged then we ought to get the screen’s output like the underneath screen capture.

debugPaintBaselineEnabled:

The debugPaintBaselineEnabled This paints a line on each baseline in the screen. Now add debugPaintBaselineEnabled then restart the app.

Let us understand this with the help of a reference.

debugPaintBaselinesEnabled = true;

When the app is debugged then we ought to get the screen’s output like the underneath screen capture.

debugPaintLayerBorderEnabled:

debugPaintLayerBordersEnabled This makes each layer in the screen a box around a border and draws a paint line. Now add debugPaintLayerBordersEnabled then restart the app.

Let us understand this with the help of a reference.

debugPaintLayerBordersEnabled = true;

When the app is debugged then we ought to get the screen’s output like the underneath screen capture.

debugRepaintRainbowEnabled:

The debugRepaintRainbowEnabled This overlays the rotating set of colors when repeating layers in checked mode after running in debug mode on the screen. Now add debugRepaintRainbowEnabled then restart the app.

Let us understand this with the help of a reference.

debugRepaintRainbowEnabled = true;

When the app is debugged then we ought to get the screen’s output like the underneath screen capture.

Code File:

import 'package:flutter/material.dart';
import 'package:flutter_debugging_demo/shared/custom_button.dart';
import 'package:flutter_debugging_demo/shared/custom_text_field.dart';
import 'package:flutter_debugging_demo/themes/appthemes.dart';
import 'package:flutter_debugging_demo/themes/device_size.dart';
import 'package:flutter/rendering.dart';

class DebuggingDemo extends StatefulWidget {
@override
_DebuggingDemoState createState() => _DebuggingDemoState();
}

class _DebuggingDemoState extends State<DebuggingDemo> {
@override
Widget build(BuildContext context) {
debugPaintSizeEnabled = true;
debugPaintBaselinesEnabled = false;
debugPaintLayerBordersEnabled = false;
debugRepaintRainbowEnabled = false;
debugRepaintTextRainbowEnabled = false;
debugCheckElevationsEnabled = false;
debugDisableClipLayers = false;
debugDisablePhysicalShapeLayers = false;
debugDisableOpacityLayers = false;
return Scaffold(
appBar: AppBar(
title: Text('Debugging Demo'),
),
body: Container(
height: DeviceSize.height(context),
width: DeviceSize.width(context),
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 100),
//alignment:Alignment.bottomCenter,
child: ClipOval(
child: CircleAvatar(
backgroundColor: Colors.transparent,
maxRadius: 50,
child: Image.asset(
'assets/images/login.jpeg',
fit: BoxFit.cover,
width: DeviceSize.width(context),
),
),
),
),
Container(
padding: EdgeInsets.only(top: 40, left: 25, right: 25),
child: CustomTextField(
hintText: 'User Name',
type: TextInputType.text,
obscureText: false,
labelText: '',
),
),
Container(
padding: EdgeInsets.only(top: 20, left: 25, right: 25),
child: CustomTextField(
hintText: 'Passwrod',
type: TextInputType.text,
obscureText: true,
labelText: '',
),
),
Container(
margin: EdgeInsets.only(top: 20),
child: CustomButton(
callbackTertiary: () {
debugDumpApp();
},
color: Colors.blue,
mainButtonText: 'Login',
),
),
Container(
padding: EdgeInsets.only(top: 20, left: 25, right: 25),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Forgot Password?',
style: TextStyle(fontSize: 13, fontWeight: FontWeight.w700),
),
Text(
'Register',
style: TextStyle(
color: Colors.blue,
fontSize: 13,
fontWeight: FontWeight.w700),
),
],
),
),
],
),
),
);
}

void debugDumpApp() {
assert(WidgetsBinding.instance != null);
String mode = 'RELEASE MODE';
assert(() {
mode = 'CHECKED MODE';
return true;
}());
debugPrint('${WidgetsBinding.instance.runtimeType} - $mode');
if (WidgetsBinding.instance.renderViewElement != null) {
debugPrint(WidgetsBinding.instance.renderViewElement.toStringDeep());
} else {
debugPrint('<no tree currently mounted>');
}
}
}

Conclusion :

In this article, I have explained Debugging in a flutter, which you can modify and experiment with according to your own, this little introduction was from the Debugging demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Debugging in your flutter project. We showed you what Debugging is and work on it 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 Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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

Verify Email and Reset Password in Flutter

0

Hii! Flutter Developer, I am here with another interesting flutter blog. In this blog, we shall learn how to authenticate using firebase API, verify the user email with OTP learn how to reset the password.

Using firebase_auth the package you can also do the same. Using this package is you can use the resetPassword method to send the reset password link on the user’s mail and there you can reset the password. But I wanted to reset the password from the app itself. So I researched about it and I got the following solution.

While making this app I came across a bug, that the firebase backend accepts the anonymous email while authentication. In general, accepting anonymous emails is not a good practice. So it would be really great to verify the user’s email with an OTP and then reset the password.

Before getting into the coding part let me first explain to you what we are going to build in the app. Firstly we will make a SignUp Login screen that will handle the authentication. On the Login page, we will use Forgot Password bottom to reset the password. On tapping it will navigate us to forget password screen, it will have one reset password button. This button will trigger the verify method that will send an OTP to the given mail. After that will build a screen to get the OTP from the user and then we will verify it, if it is right then we will navigate to a new screen that will take the new password from the user and update it on the database using API.


Let’s look at the packages used:

http: ^0.12.0+2
email_auth: ^0.0.1
firebase_core:
shared_preferences: ^2.0.5

http package is used to handle the API request. email_auth package is used to validate the mail. firebase_core is used for firebase integration with the app. shared_preferences package is used to store the auth TOKEN in-app local storage.

Configure app and firebase:

Firebase
Backed by Google and loved by app development teams – from startups to global enterprises Save the date – Google I/O…firebase.google.co

  • Go to the firebase website and connect your app with firebase.
  • Go to the authentication tab and enable the email password authentication method.
  • Open project setting to get the Web API key .
We will use this API key to handle API requests.

Now will start writing our code…

Offical Documentation

Firebase Auth REST API
AnalyticsUserPropertyAllowAdPersonalizationSignalsfirebase.google.com

First of all, we will build our authentication services that will be required to handle our authentication.

Create a class AuthServices . In this class, we will make _authenticate, signUp, login and changePassword .

import 'dart:convert';

import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
class AuthServices {
String _token;

Future<void> _authenticate(
String email, String password, String urlSegment) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
final url =
'https://identitytoolkit..com/v1/accounts:$urlSegment?key='YOUR WEB API KEY';
final response = await http.post(
url,
body: json.encode(
{
'email': email,
'password': password,
'returnSecureToken': true,
},
),
);
final responseData = json.decode(response.body);
 print(responseData);
_token = responseData['idToken'];
 print('************************' + _token.toString());
try {
if (urlSegment == "signUp") {
sharedPreferences.setString("token", _token.toString());
 }
} catch (e) {
print(e);
}
print("true");
}

Future<void> signUp(String email, String password) async {
return _authenticate(email, password, 'signUp');
}

Future<void> login(String email, String password) async {
return _authenticate(email, password, 'signInWithPassword');
}

Future<void> changePassword(String newPassword) async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
print(newPassword);
_token = sharedPreferences.getString("token");
final url =
'https://identitytoolkit.googleapis.com/v1/accounts:update?key='YOUR WEB API KEY';
try {
await http.post(
url,
body: json.encode(
{
'idToken': _token,
'password': newPassword,
'returnSecureToken': true,
},
),
);
} catch (error) {
throw error;
}
}
}

_authenticate method

Here we have created a method _authenticate , this method takes three arguments email, password and urlSagment . It will handle the app signUp and sign in or any other desired activity using the urlSagement .

final url =
'https://identitytoolkit..com/v1/accounts:$urlSegment?key='YOUR WEB API KEY';

This URL is used to send API request to the firebase database, at the end of this URL a key is required i.e. the Web API Key that we got from the firebase project setting tab.

final response = await http.post(
url,
body: json.encode(
{
'email': email,
'password': password,
'returnSecureToken': true,
},
),
);

Using the HTTP package we will send a post request that will intake the url as URL, inside the body, we will pass three fields email password and returnSecureToken . returnSecureToken is set to true because we will need token to change the password that is generated while signing Up the user.

final responseData = json.decode(response.body);
print(responseData);
_token = responseData['idToken'];

We will now decode the responseData and get the idToken in a _token variable.

try {
if (urlSegment == "signUp") {
sharedPreferences.setString("token", _token.toString());
}
} catch (e) {
print(e);
}

We need to store the token somewhere inside the local storage or on a database because we will need this token at the time of change password functionality. So we will be using SharedPreferences to store the token and we will fetch it when needed.

signUp method

Future<void> signUp(String email, String password) async {
return _authenticate(email, password, 'signUp');
}

In this method, we are returning the _authenticate method with signUp as the urlSagment.

login method

Future<void> login(String email, String password) async {
return _authenticate(email, password, 'signInWithPassword');
}

In this method, we are returning the _authenticate method with signInWithPassword as the urlSagment.

changePassword method

SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
_token = sharedPreferences.getString("token");

We will first fetch out token from our local database. and store it in our _token variable.

final url =
'https://identitytoolkit.googleapis.com/v1/accounts:update?key='YOUR WEB API KEY';

We will need an update urlSagment to update the password.

try {
await http.post(
url,
body: json.encode(
{
'idToken': _token,
'password': newPassword,
'returnSecureToken': true,
},
),
);
} catch (error) {
throw error;
}

Using the post method we will change the user password. The body will take three fields idToken, password, and returnSecureToken .

The above class will be able to handle our signUp, login, and changepassword functionality. Now we will discuss how we can verify the mail.

Verify email with OTP

Sending OTP to the email.

void sendOtp() async {
EmailAuth.sessionName = "Company Name";
bool result =
await EmailAuth.sendOtp(receiverMail: _emailController.value.text);
if (result) {
setState(() {
submitValid = true;
});
}
}

This method will send an OTP on the given email. EmailAuth package is used to send the OTP to the email. sendOtp method will return true if the OTP is sent, if not it will return false.

void verify() {
EmailAuth.validate(
receiverMail: _emailController.value.text,
userOTP: _otpController.value.text);
}

EmailAuth package provides us validate method to verify the OTP entered by the users.

+++OTP email received from firebase+++

GitHub Link:

Anmol Gupta-aeologic/reset_password
A new Flutter application. This project is a starting point for a Flutter application. A few resources to get you…github.com

🌸🌼🌸 Thank you for reading. 🌸🌼🌸


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 987tr project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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

Custom Google Map Markers In Flutter

0

Flutter developers favor Google Maps for their application since they give native execution to android and iOS both. It permits us to carry out the code one time and license them to run the code for the two devices android and iOS. Google Maps Flutter module is given in the Google Map widget that upholds initialCameraPosition, maptype and onMapCreated. We can set the situation of the camera and marker in any put on the earth. We can plan the marker as per our decision. It additionally accompanies a zoom property in a cameraposition to give the zooming in google map see on the underlying page.

In flutter, we display a custom marker (icon) in GoogleMap(), which displays an icon and text according to a destination location in our application, which will usually display the location with a custom image.

In this article, we will show how to apply GoogleMaps in a flutter. Along with that, we will see how to use a custom icon for a map marker. so let’s get started.


Table Of Contents :

Flutter

Custom Google Map Markers

Implementation

Code Implement

Code File

Conclusion


Flutter :

Our Flutter Tutorial gives essential and progressed ideas of the Flutter framework. It is free and open-source. At first, it was created by Google and now oversees by an ECMA standard. Flutter applications use Dart programming language for making an application.

“Flutter is Google’s UI toolkit that helps you build beautiful and natively combined applications for mobile, web, and desktop in a single codebase in record time, Flutter offers great developer tools, with amazing hot reload.”

Custom Google Map Marker :

To show custom google map markers in flutter applications, the google_maps _flutter package has to be used as we do to search for any destination location and it has a current location marker (icon) which google map provides but the user can make this marker a custom marker.

Implementation :

You need to implement it in your code respectively :

Step 1: Add dependencies.

Add dependencies to pubspec — yaml file.

dependencies:
google_maps_flutter: ^2.0.3

Step 2: Import the package :

import 'package:google_maps_flutter/google_maps_flutter.dart';

Step 3: Run flutter package get

Step 4: Add API key & permisson to app/main/AndroidManifest.xml

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR KEY HERE"/>

Step 5: Add permisson to app/main/AndroidManifest.xml

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

Code Implement :

Let’s make it into our UI file google_map_screen.dart.

Before defining Google Map, we have taken a new dart file inside which the GoogleMap widget and its properties are defined. In its onMapCreated property, we will define the GoogleMapController object. It is used when we have to create a map.

GoogleMap(
onMapCreated: _onMapCreated,
markers: customMarkers.toSet(),
initialCameraPosition: CameraPosition(
target: _center,
zoom: 10.0,
),
),void _onMapCreated(GoogleMapController controller) {
mapController = controller;
}

Now we use the markers property which we have created a list of custom markers that are initialized inside the mapBitmapsToMarkers() method and have defined the marker generator class inside the setState() within the initState().

List<Marker> mapBitmapsToMarkers(List<Uint8List> bitmaps) {
bitmaps.asMap().forEach((mid, bmp) {
customMarkers.add(Marker(
markerId: MarkerId("$mid"),
position: locations[mid].coordinates,
icon: BitmapDescriptor.fromBytes(bmp),
));
});
}

@override
void initState() {
MarkerGenerator(markerWidgets(), (bitmaps) {
setState(() {
mapBitmapsToMarkers(bitmaps);
});
}).generate(context);
}

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

Code File:

import 'dart:typed_data';
import 'package:custom_google_map_markers/locations.dart';
import 'package:custom_google_map_markers/view/Markergenerator.dart';
import 'package:custom_google_map_markers/view/map_marker.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

class GoogleMapScreen extends StatefulWidget {
@override
_GoogleMapScreenState createState() => _GoogleMapScreenState();
}

class _GoogleMapScreenState extends State<GoogleMapScreen> {
GoogleMapController mapController;

final LatLng _center = const LatLng(28.535517, 77.391029);

List<MapMarker> mapMarkers = [];
List<Marker> customMarkers = [];

List<Marker> mapBitmapsToMarkers(List<Uint8List> bitmaps) {
bitmaps.asMap().forEach((mid, bmp) {
customMarkers.add(Marker(
markerId: MarkerId("$mid"),
position: locations[mid].coordinates,
icon: BitmapDescriptor.fromBytes(bmp),
));
});
}

@override
void initState() {
MarkerGenerator(markerWidgets(), (bitmaps) {
setState(() {
mapBitmapsToMarkers(bitmaps);
});
}).generate(context);
}

void _onMapCreated(GoogleMapController controller) {
mapController = controller;
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Custom Marker Demo'),
backgroundColor: Colors.blue,
centerTitle: true,
),
body: Container(
child: GoogleMap(
onMapCreated: _onMapCreated,
markers: customMarkers.toSet(),
initialCameraPosition: CameraPosition(
target: _center,
zoom: 10.0,
),
),
),
);
}

List<Widget> markerWidgets() {
return locations.map((loc) => MapMarker(loc)).toList();
}
}

Conclusion:

In this article, I have explained Custom Google Map Markers in Flutter, which you can modify and experiment with according to your own, this little introduction was from the Custom Google Map Markers from our side.

I hope this blog will provide you with sufficient information in Trying up the Custom Google Map Markers in your flutter project. We will show you the Custom Google Map Markers is?, and work on it 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 Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

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

Explore Scratch Card Animation In Flutter

0

In this article, we will Explore Scratch Card Animation In Flutter. We see how to execute a demo program. We will tell you the best way how to make an interactive and immersive scratch card animation using the scratcher package in your Flutter applications.

For Scratcher

scratcher | Flutter package
Scratch card widget which temporarily hides content from the user.pub.dev

For Confetti

confetti | Flutter package
Blast colorful confetti all over the screen. Celebrate in app achievements with style. Control the velocity, angle…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

A scratch card animation to your Flutter application can be only the remarkable touch you want to enamor users and upgrade engagement. Envision the expectation as clients swipe away to uncover stowed away satisfied, suggestive of lottery scratch cards. Scratch cards are inseparable from fervor and secret.

Scratch cards uncover discounts, extraordinary offers, or selective content, scratch card animations offer a tomfoolery and connecting method for interfacing with your application.

The below demo video shows how to make a scratch card animation in Flutter and how a scratch card animation will work using the scratcher package in your Flutter applications. We will make a scratch card for users when users swipe the card to reveal hidden prices. 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
scratcher: ^2.5.0
confetti: ^0.7.0

Step 2: Import

import 'package:scratcher/scratcher.dart';
import 'package:confetti/confetti.dart';

Step 3: Add the assets

Add assets to pubspec — yaml file.

assets:
- assets/

Step 4: 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 ScratchCard() in the same dart file. In this class, we will make a late ConfettiController variable was _controller.

late ConfettiController _controller;

Now, we will add the initState() method. In this method, we will add the _controller is equal to the ConfettiController(). Inside the bracket we will add a duration was 2 seconds.

@override
void initState() {
super.initState();
_controller = ConfettiController(
duration: const Duration(seconds: 2),
);
}

In the body, we will add a Scratcher() method. In this method, we will add brushSize was 50 means the size of the brush. The bigger it is the faster the user can scratch the card, a threshold was 75 means the percentage level of the scratch area that should be revealed to complete. The scratch is finished and reaches the threshold value, ConfettiController will create a confetti animation. 

Center(
child: Scratcher(
brushSize: 50,
threshold: 75,
color: Colors.blue,
image: Image.asset(
"assets/scratch.jpeg",
fit: BoxFit.fill,
),
onChange: (value) => print("Scratch progress: $value%"),
onThreshold: () => _controller.play(),
child: SizedBox(
height: MediaQuery.of(context).size.height*0.3,
width: MediaQuery.of(context).size.width*0.6,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/reward.png",
fit: BoxFit.cover,
width: MediaQuery.of(context).size.height*0.25,
height: MediaQuery.of(context).size.height*0.25,
),
Column(
children: [
ConfettiWidget(
blastDirectionality: BlastDirectionality.explosive,
confettiController: _controller,
particleDrag: 0.05,
emissionFrequency: 0.05,
numberOfParticles: 100,
gravity: 0.05,
shouldLoop: false,
colors: const [
Colors.green,
Colors.red,
Colors.yellow,
Colors.blue,
Colors.purple
],
),
],
),
],
),
),
),
)

The Scratcher widget has the property “onThreshold” to play confetti animation inside the application. ConfettiWidget and reward picture are added as a child of the Scratcher widget to show the prizes. Modify the confetti animation involving properties in ConfettiWidget as we have added a few properties in our model.

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

Output

Code File:

import 'package:confetti/confetti.dart';
import 'package:flutter/material.dart';
import 'package:flutter_scratch_card_demo/splash_screen.dart';
import 'package:scratcher/scratcher.dart';

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

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

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,

),
home: const Splash(),
);
}
}

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

@override
State<ScratchCard> createState() => _ScratchCardState();
}

class _ScratchCardState extends State<ScratchCard> {
late ConfettiController _controller;

@override
void initState() {
super.initState();
_controller = ConfettiController(
duration: const Duration(seconds: 2),
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(title: const Text("Flutter Scratch Card Demo"),
automaticallyImplyLeading: false,
centerTitle: true,
backgroundColor: Colors.tealAccent,),
body: Center(
child: Scratcher(
brushSize: 50,
threshold: 75,
color: Colors.blue,
image: Image.asset(
"assets/scratch.jpeg",
fit: BoxFit.fill,
),
onChange: (value) => print("Scratch progress: $value%"),
onThreshold: () => _controller.play(),
child: SizedBox(
height: MediaQuery.of(context).size.height*0.3,
width: MediaQuery.of(context).size.width*0.6,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/reward.png",
fit: BoxFit.cover,
width: MediaQuery.of(context).size.height*0.25,
height: MediaQuery.of(context).size.height*0.25,
),
Column(
children: [
ConfettiWidget(
blastDirectionality: BlastDirectionality.explosive,
confettiController: _controller,
particleDrag: 0.05,
emissionFrequency: 0.05,
numberOfParticles: 100,
gravity: 0.05,
shouldLoop: false,
colors: const [
Colors.green,
Colors.red,
Colors.yellow,
Colors.blue,
Colors.purple
],
),
],
),
],
),
),
),
),
);
}
}

Conclusion:

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

I hope this blog will provide you with sufficient information on Trying Scratch Card Animation in your Flutter projects. We will show you what the Introduction is. Make a demo program for working on the Scratch Card Animation using the scratcher package in your Flutter applications. So please try it.

❤ ❤ Thanks for reading this article ❤❤

If I need to correct something? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

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

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


Face Mask Detection App In Flutter With TensorFlow Lite

0

COVID-19 crises have drastically affected our livelihood. There are many guidelines given by WHO to prevent the spread of the COVID-19 virus. This virus is very dangerous and infectious. In today’s scenarios, it has become mandatory to wear a mask in public places. In many countries, people are even charged money for not wearing a mask. So it has become our moral duty to wear a mask in public places, but some people are not following the guidelines. The system can’t identify the people who are not wearing a mask, so it has become important to build a tool to identify the person whether he/she is wearing a mask or not. With the help of Machine Learning & Deep Learning, we can easily build a model and train it with a dataset to solve this problem and help prevent the spread of the COVID-19 virus.

In this blog, we shall learn how to build a Face Mask Detection app with Flutter using tflite package to identify whether the person is wearing a mask or not.


Table of contents:

Install Packages

Configure Project

Download training dataset & train our model

Initializing Camera

Load Model

Run Model

Camera Preview

Full Code


Demo Module:

Install Packages:

To build this app we will need two packages:

camera | Flutter Package
A Flutter plugin for iOS and Android allows access to the device cameras. Note: This plugin is still under…pub.dev

tflite | Flutter Package
A Flutter plugin for accessing TensorFlow Lite API. Supports image classification, object detection ( SSD and YOLO)…pub. dev

  • camera the package is used to get the streaming image buffers.
  • tflite is used to run our trained model.

Configure Project:

  • For Android

In android/app/build.gradle, add the following setting in android block.

aaptOptions {
noCompress 'tflite'
noCompress 'lite'
}
  • Change minSdkVersion 21

Download training dataset & train our model:

  • To download the dataset visit kaggle.com and search for “Face mask detection”.
  • Download the dataset.

COVID Face Mask Detection Dataset
This dataset contains about 1006 equally distributed images of 2 distinct types.www.kaggle.com

  • Upload the images of masked people in With mask class and Without mask images in Without mask class.
  • Then click on Train Model , do not change the settings.
  • Export the model.
  • Click on Tensorflow Lite and download the model.
  • Click on Ok
  • Export the model.tflite and lable.txt file and store them in the assets folder in your project.

Let’s start coding:

Initializing Camera:

Inside the main method initialize the available cameras using availableCameras.

List<CameraDescription> cameras;

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
runApp(MyApp());
}

camera the package provides us with support for live image streaming. Firstly create an object of the CameraController. CameraController takes two arguments CameraDescription and ResolutionPreset. initialize the cameraController and then we can start our image streaming using the startImageStream method. startImageStream the method that provides us with the images, we will give these images to cameraImage and then we will run our model.

CameraImage cameraImage;
CameraController cameraController;
String result = "";

initCamera() {
cameraController = CameraController(cameras[0], ResolutionPreset.medium);
cameraController.initialize().then((value) {
if (!mounted) return;
setState(() {
cameraController.startImageStream((imageStream) {
cameraImage = imageStream;
runModel();
});
});
});
}

Load Model:

Tflite provides us loadModel method to load our model. It takes two values model file path and labels file path.

loadModel() async {
await Tflite.loadModel(
model: "assets/model.tflite", labels: "assets/labels.txt");
}

Run Model:

In this method, we will run the model using Tflite. Here we are using the live stream of the image so we will have to use runModelOnFrame the method to run our model.

runModel() async {
if (cameraImage != null) {
var recognitions = await Tflite.runModelOnFrame(
bytesList: cameraImage.planes.map((plane) {
return plane.bytes;
}).toList(),
imageHeight: cameraImage.height,
imageWidth: cameraImage.width,
imageMean: 127.5,
imageStd: 127.5,
rotation: 90,
numResults: 2,
threshold: 0.1,
asynch: true);
recognitions.forEach((element) {
setState(() {
result = element["label"];
print(result);
});
});
}
}

recognitions is the list of future so for each element or label text, we will set it to result variable.

initState method:

@override
void initState() {
super.initState();
initCamera();
loadModel();
}

Camera Preview:

Tflite package provide us CameraPreview widget to preview the camera on the app screen, it takes cameraController .

AspectRatio(
aspectRatio: cameraController.value.aspectRatio,
child: CameraPreview(cameraController),
),

Displaying Result

Text(
result,
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 25),
)

Full Code:

import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:tflite/tflite.dart';

List<CameraDescription> cameras;

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark(),
home: MyHomePage(),
);
}
}

class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
CameraImage cameraImage;
CameraController cameraController;
String result = "";

initCamera() {
cameraController = CameraController(cameras[0], ResolutionPreset.medium);
cameraController.initialize().then((value) {
if (!mounted) return;
setState(() {
cameraController.startImageStream((imageStream) {
cameraImage = imageStream;
runModel();
});
});
});
}

loadModel() async {
await Tflite.loadModel(
model: "assets/model.tflite", labels: "assets/labels.txt");
}

runModel() async {
if (cameraImage != null) {
var recognitions = await Tflite.runModelOnFrame(
bytesList: cameraImage.planes.map((plane) {
return plane.bytes;
}).toList(),
imageHeight: cameraImage.height,
imageWidth: cameraImage.width,
imageMean: 127.5,
imageStd: 127.5,
rotation: 90,
numResults: 2,
threshold: 0.1,
asynch: true);
recognitions.forEach((element) {
setState(() {
result = element["label"];
print(result);
});
});
}
}

@override
void initState() {
super.initState();
initCamera();
loadModel();
}

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: Text("Face Mask Detector"),
),
body: Column(
children: [
Padding(
padding: const EdgeInsets.all(20),
child: Container(
height: MediaQuery.of(context).size.height - 170,
width: MediaQuery.of(context).size.width,
child: !cameraController.value.isInitialized
? Container()
: AspectRatio(
aspectRatio: cameraController.value.aspectRatio,
child: CameraPreview(cameraController),
),
),
),
Text(
result,
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 25),
)
],
),
),
);
}
}

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


🌸🌼🌸 Thank you for reading. 🌸🌼🌸

From Our Parent Company Aeologic

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

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

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

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

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

Declarative and Imperative Programming in the flutter

0

Maybe after reading the heading you would be thinking about how this core concept is relevant in the flutter. So the answer is “Core Concept remains the same irrespective of language and framework”, and here we are going to take a look at what is this declarative and imperative programming, what are the advantages, and how both things effect or affect the programming approaches.

Declarative programming and imperative programming are two different approaches to get your work done


Table Of Contents::

Declarative Programming

Imperative Programming

Reusability

Managing Errors

Lack Of control

Lack of Efficiency

Conclusion


Declarative Programming:

Declarative programming is a kind of programming or approach where we mainly focus on our desired output or what would be the result irrespective of process, approaches, coding pattern. We simply pay attention to what we are trying to achieve.

Imperative Programming:

Imperative programming is a kind of programming or approach where we make our focus on the process, follow guidelines, patterns step by step and try to compile things in order from where the correct answer can be found.

These definitions of both approaches would have cleared the basic difference between them but let’s take a little glance over this analogy again if you are wanting a final product or output without caring about the path process or pattern and wanting it to get ready for the final version and able to do so it comes under the declarative kind of thing.

While you are not only wanting to get your product done but you are focusing on the thing like skills, you want yourself to get involved with the product make your self able to do thing by your own only just to make up the requirements keeping all legitimate requirements in a best-suited way is comes under imperative programming.

Why you should Prefer Declarative Programming

Reusability:

In declarative programming the main aim to write code that could be reusable. In flutter, there are different ways to do so like using extensions or making custom widgets(at a normal level) however this is not the main aim of declarative programming but making a big whole module that can perform the whole required operation. here we are going to see a simple example of an extension method that we can use in the whole app but write only once.

import 'package:flutter/material.dart';

extension ShapeBorderX on ShapeBorder {
static ShapeBorder roundedRectangle(double radius) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(radius),
),
);
}
}

extension WidgetPaddingX on Widget {
Widget paddingAll(double padding) => Padding(
padding: EdgeInsets.all(padding),
child: this,
);
}

Managing Errors:

In Declarative programming, we write centralized code and try to manage each and everyone at the same place and does not change the working it helps to reduce errors while maintaining the code compilation and it helps to become your app more stable and make you able to read input-output of method efficiently.

But there are certain drawbacks of Declarative Programming

Lack Of control :

In Declarative programming, you may have a problem when you get something that contains the same thing but some additional features which have not been handled in your centralized code and this is a struggling time for you as a developer but as we know that flutter has a solution for this also, you need to define these new things also as an optional parameter.

import 'package:flutter/material.dart';
import 'package:gamekhelo/custome_widgets/custom_plain_button.dart';
import 'package:gamekhelo/extras/constants/index.dart';
import 'package:gamekhelo/extras/constants/dimensions.dart';
import 'package:gamekhelo/extras/theme/text_themes.dart';

class CustomDialog extends StatelessWidget {
final DialogType dialogType;
final String title;
final Function onOk;
final Function onCancel;
const CustomDialog({this.dialogType, this.title, this.onOk, this.onCancel});
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Colors.transparent,
child: Container(
height: Dimensions.boxHeight * 30,
width: Dimensions.boxWidth * 80,
padding: EdgeInsets.all(Dimensions.boxHeight * 3),
decoration: BoxDecoration(
color: ColorConstants.grey,
borderRadius: BorderRadius.circular(10),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Text(
title,
style: TextThemes.h17.copyWith(
color: ColorConstants.textWhite70,
),
),
],
),
),
SizedBox(
height: Dimensions.boxHeight * 2,
),
SizedBox(
width: Dimensions.boxWidth * 70,
child: dialogType == DialogType.confirm
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 100,
child: CustomPlainButton(
isOutlined: true,
isSmall: true,
onTap: onCancel ??
() {
Navigator.pop(context);
},
label: "CANCEL",
),
),
SizedBox(
width: 100,
child: CustomPlainButton(
isSmall: true,
onTap: onOk ??
() {
Navigator.pop(context);
},
label: "OK",
),
),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 100,
child: Center(
child: CustomPlainButton(
isSmall: true,
onTap: onOk ??
() {
Navigator.pop(context);
},
label: "OK",
),
),
),
],
),
),
],
),
),
);
}
}

for example, in the above code, you can see a Custom Dialogue where the only few required things and it is being used in the whole app but if you need to show an extra text at any place we are not going to design another dialogue but will make that text optional and will show. Now that extra text will be compiled in every dialogue even though it is not being used in other dialogues.

Lack of Efficiency:

When you are doing all these things which have mentioned above and you are making your whole code able to work on all desired features being used in your application but while you also having some part of code that is not being used in some special parts at that time compiler compiles that set of code while you are not using it. So sometimes it can be a little hectic for the compiler.

for example, you are using text field as a custom widget and performing some validation in some part and showing error while at some places you don’t need to do validation but when the code compiler will compile code it will compile at both places. (it can also be managed but it is an example for common understanding)

Conclusion:

In this article, we have understood how declarative programming can empower the working of any application and how it can be beneficial, when it comes to maintaining high-class code architecture however the examples explained above were just understanding of basics, and code snippets were only for a demo, but one thing is clear declarative programming is an approach which has been largely accepted and advocated by the community.

❤ ❤ Thanks for reading this article ❤❤

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

Clap 👏 If this article helps you.


From Our Parent Company Aeologic

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

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

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

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

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