Google search engine
Home Blog Page 48

The Evolution of Casino Gaming: From Land-Based to Online Platforms

The casino industry has undergone a significant transformation over the past few decades, shifting from traditional land-based establishments to dynamic online platforms. This evolution has been driven by technological advancements and changing consumer preferences. In 2023, the global online gambling market was valued at approximately $63 billion, with projections indicating it could reach $114 billion by 2028, according to a report by Grand View Research.

One of the pioneers in the online casino space is Microgaming, which launched its first online casino software in 1994. This marked the beginning of a new era in gaming, allowing players to enjoy their favorite games from the comfort of their homes. For more insights into the history of online gambling, you can visit Wikipedia.

In recent years, the rise of mobile gaming has further revolutionized the industry. With smartphones becoming ubiquitous, casinos have optimized their platforms for mobile use, enabling players to gamble on-the-go. Companies like Bet365 have capitalized on this trend, offering a seamless mobile experience that attracts a younger demographic. You can follow Bet365’s updates on their Twitter profile.

Moreover, the integration of live dealer games has bridged the gap between online and land-based casinos. Players can now interact with real dealers in real-time, enhancing the gaming experience. This feature has gained immense popularity, especially during the COVID-19 pandemic when many physical casinos were closed.

As the industry continues to evolve, players should remain informed about responsible gambling practices. Online casinos often provide tools for setting limits and self-exclusion options to promote safe gaming. Additionally, it is crucial to choose licensed platforms to ensure fair play and security. For more information on responsible gambling, check out online pokies australia.

In conclusion, the casino industry is in a state of constant evolution, driven by technology and consumer demand. As online platforms continue to grow, understanding the landscape will help players make informed choices and enjoy a safe gaming experience.

Mother your children are like birds

Verse 1

For as long as I can remember,
The windows always glowed for me,
In the room filled with quiet spring,
And embroidered towels on the wall.
In that sacred, peaceful chamber,
A child’s heart would read and know
Shevchenko’s kind and watchful eyes,
And golden patterns in a row.

Chorus

Mother, your children are like birds,
Spreading wings into the sky.
Mother, to your tender room,
We’ll return again by and by.

Verse 2

That endless childhood temptation –
Open the door and you will see,
A table dressed in Sunday white
And mother waiting patiently.

Verse 3

For as long as I can remember,
That white cloth always shone so bright.
In your room, dear mother, I know,
Every day felt like Sunday light.

Chorus

Mother, your children are like birds,
Spreading wings into the sky.
Mother, to your tender room,
We’ll return again by and by.

Verse 4

Maybe far from home and shelter,
My wings will falter in the air.
The star will fade, and after that –
No more nightingales anywhere.

Verse 5

Son, remember this, my son –
No matter where life takes your flight,
All may leave their mother’s home,
But none forget its gentle light.

Chorus (x2)

Mother, your children are like birds,
Spreading wings into the sky.
Mother, to your tender room,
We’ll return again by and by.

Best Practices for State Management in Flutter Apps

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

What is State Management in Flutter?

Types of State in Flutter

Popular State Management Approaches in Flutter

When to Use Which State Management Approach?

Best Practices for State Management in Flutter

Conclusion

Reference


Introduction

State management is one of the most crucial aspects of Flutter development. It determines how data flows and updates across your app, impacting performance, maintainability, and user experience.

Choosing the right state management approach depends on the complexity of your app, the size of your development team, and the features you need to implement.

In this guide, we will cover:
 1. What state management is and why it’s important
 2. Types of state in Flutter
 3. Popular state management solutions
 4. Best practices for writing scalable and efficient apps

What is State Management in Flutter?

In simple terms, state is the data that changes during the lifecycle of an app.

For example:

  • The current theme (dark/light mode)
  • A user’s login status
  • A list of items in a shopping cart

State management ensures that when the state changes, the UI updates accordingly.

Types of State in Flutter

There are two types of state in Flutter:

Ephemeral (UI) State

  • Temporary state that doesn’t need to be shared across widgets.
  • Example: TextField input, animations, page scroll position
  • Best handled using StatefulWidget

App State (Global State)

  • State that needs to be shared across multiple screens.
  • Example: User authentication, theme settings, cart items, API data
  • Requires a state management solution

Popular State Management Approaches in Flutter

Flutter provides multiple ways to manage state. Below are the most commonly used approaches, along with their advantages and best use cases.

1. setState() (Basic Approach)

  • Best For: Small apps, UI-related state
  • Complexity: Low
  • Pros:
     Simple and easy to implement
     No extra dependencies required
  • Cons:
     Not scalable for large apps
     Causes unnecessary widget rebuilds

2. InheritedWidget (Built-in Flutter Solution)

  • Best For: Low-level state sharing between widgets
  • Complexity: Medium
  • Pros:
     Part of Flutter’s core framework (no extra package)
     Good for sharing state across widget trees
  • Cons:
     Complex to manage for large apps
     Requires manual updates and rebuilds

3. Provider (Recommended for Most Apps)

  • Best For: Small to medium apps needing shared state
  • Complexity: Medium
  • Pros:
     Easy to integrate and scalable
     Built on InheritedWidget (efficient state updates)
     Good community support
  • Cons:
     Not ideal for complex business logic
     Requires understanding of ChangeNotifier

4. Riverpod (Better Alternative to Provider)

  • Best For: Scalable apps with dependency injection
  • Complexity: Medium
  • Pros:
     Eliminates the limitations of Provider
     Safer and more flexible with auto-dispose
     Works well with dependency injection
  • Cons:
     Slight learning curve compared to Provider

5. Bloc (Business Logic Component)

  • Best For: Large, enterprise-level apps
  • Complexity: High
  • Pros:
     Predictable state management with events & states
     Well-structured and testable
     Good for apps needing explicit state transitions
  • Cons:
     Boilerplate-heavy (requires defining events, states, and blocs)
     Steep learning curve for beginners

6. GetX (Lightweight and Fast)

  • Best For: Apps needing minimal boilerplate
  • Complexity: Low to Medium
  • Pros:
     Simple and requires less code
     Built-in dependency injection and routing
     Lightweight and high-performance
  • Cons:
     Not officially recommended by Flutter
     Can lead to less structured code if misused

7. Redux (Predictable State Management)

  • Best For: Apps needing a centralized state management solution
  • Complexity: High
  • Pros:
     Good for apps needing time-travel debugging
     Scales well for large applications
  • Cons:
     Boilerplate-heavy and complex
     Overkill for simple apps

When to Use Which State Management Approach?

Using setState() for Local UI State

Use setState for small state updates within a single widget.

class CounterScreen extends StatefulWidget {
@override
_CounterScreenState createState() => _CounterScreenState();
}

class _CounterScreenState extends State<CounterScreen> {
int _counter = 0;

void _incrementCounter() {
setState(() {
_counter++;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(child: Text('Counter: $_counter')),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
child: Icon(Icons.add),
),
);
}
}

 Best For: Small, simple apps
 Not suitable for: Large apps with shared state

Using Provider (Recommended for Most Apps)

Provider is a lightweight and efficient state management solution that builds on InheritedWidget.

Installation

dependencies:
provider: ^6.0.5

Implementation

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

// 1. Create a ChangeNotifier class
class CounterModel extends ChangeNotifier {
int _counter = 0;
int get counter => _counter;

void increment() {
_counter++;
notifyListeners(); // Notifies widgets to rebuild
}
}

void main() {
runApp(
ChangeNotifierProvider(
create: (context) => CounterModel(),
child: MyApp(),
),
);
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: CounterScreen(),
);
}
}

class CounterScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text('Counter: ${context.watch<CounterModel>().counter}'),
),
floatingActionButton: FloatingActionButton(
onPressed: () => context.read<CounterModel>().increment(),
child: Icon(Icons.add),
),
);
}
}

Best For: Medium-sized apps with moderate state sharing
Not suitable for: Very complex business logic

Using Riverpod (Better Provider Alternative)

Riverpod is a safer and more powerful version of Provider with dependency injection.

Installation

dependencies:
flutter_riverpod: ^2.3.6

Implementation

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

// Define a state provider
final counterProvider = StateProvider<int>((ref) => 0);

void main() {
runApp(ProviderScope(child: MyApp()));
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: CounterScreen(),
);
}
}

class CounterScreen extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final counter = ref.watch(counterProvider);

return Scaffold(
body: Center(child: Text('Counter: $counter')),
floatingActionButton: FloatingActionButton(
onPressed: () => ref.read(counterProvider.notifier).state++,
child: Icon(Icons.add),
),
);
}
}

Using Bloc (For Large Apps with Complex Logic)

Bloc (Business Logic Component) is one of the most powerful state management solutions for Flutter. It follows a predictable state transition approach using:

  1. Events → Trigger state changes (e.g., “Increment Counter”).
  2. States → Define what UI should display (e.g., “Counter: 0”).
  3. Bloc → The core logic that takes events and produces states.

Step 1: Install Dependencies

Add the following to pubspec.yaml:

dependencies:
flutter_bloc: ^8.1.3
equatable: ^2.0.5

Step 2: Create a Bloc for Counter Management

Define Events (counter_event.dart)

import 'package:equatable/equatable.dart';

abstract class CounterEvent extends Equatable {
@override
List<Object> get props => [];
}

class IncrementEvent extends CounterEvent {}
class DecrementEvent extends CounterEvent {}

Define States (counter_state.dart)

import 'package:equatable/equatable.dart';

abstract class CounterState extends Equatable {
@override
List<Object> get props => [];
}

class CounterInitial extends CounterState {
final int counterValue;
CounterInitial(this.counterValue);

@override
List<Object> get props => [counterValue];
}
  • CounterInitial(0) → Starts with 0
  • Equatable ensures efficient state comparison, preventing unnecessary rebuilds.

Create Bloc (counter_bloc.dart)

import 'package:flutter_bloc/flutter_bloc.dart';
import 'counter_event.dart';
import 'counter_state.dart';

class CounterBloc extends Bloc<CounterEvent, CounterState> {
CounterBloc() : super(CounterInitial(0)) {
on<IncrementEvent>((event, emit) {
final newValue = (state as CounterInitial).counterValue + 1;
emit(CounterInitial(newValue)); // Emit new state
});

on<DecrementEvent>((event, emit) {
final newValue = (state as CounterInitial).counterValue - 1;
emit(CounterInitial(newValue));
});
}
}
  • on<IncrementEvent>() → Increases counter
  • on<DecrementEvent>() → Decreases counter
  • Uses emit() to update the state

Step 3: Integrate Bloc into UI (main.dart)

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'counter_bloc.dart';
import 'counter_event.dart';
import 'counter_state.dart';

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

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: BlocProvider(
create: (context) => CounterBloc(),
child: CounterScreen(),
),
);
}
}

class CounterScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Flutter Bloc Example')),
body: Center(
child: BlocBuilder<CounterBloc, CounterState>(
builder: (context, state) {
if (state is CounterInitial) {
return Text('Counter: ${state.counterValue}', style: TextStyle(fontSize: 24));
}
return Container();
},
),
),
floatingActionButton: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FloatingActionButton(
onPressed: () => context.read<CounterBloc>().add(IncrementEvent()),
child: Icon(Icons.add),
),
SizedBox(width: 20),
FloatingActionButton(
onPressed: () => context.read<CounterBloc>().add(DecrementEvent()),
child: Icon(Icons.remove),
),
],
),
);
}
}

Best For: Large-scale apps needing maintainability
Not suitable for: Small projects due to complexity

Best Practices for State Management in Flutter

1. Keep Business Logic Separate from UI

  • Use Provider, Riverpod, or Bloc to separate logic from widgets.
  • Avoid using setState() in deeply nested widgets.

2. Choose the Right State Management Solution

  • Use setState() for UI-related state (e.g., toggling a switch).
  • Use Provider/Riverpod for medium-sized apps.
  • Use Bloc for large-scale apps.

3. Use Immutable State

  • Immutable state reduces bugs.
  • Use final and const wherever possible.

4. Optimize Performance

  • Use const constructors for widgets to avoid unnecessary rebuilds.
  • Use select() in Provider/Riverpod to listen to specific state changes.

5. Use Dependency Injection for Scalability

  • Riverpod and GetIt allow easy dependency injection for maintainable code.

Conclusion:

Choosing the right state management approach depends on your app’s size and complexity:

setState() → Best for small apps with simple UI updates.
 InheritedWidget → Useful for low-level state sharing.
 Provider → Recommended for small to medium apps needing shared state.
 Riverpod → Scalable and efficient, great for dependency injection.
 Bloc → Best for large apps with complex state management needs.
 GetX → Lightweight, fast, and minimal boilerplate.
 Redux → Ideal for centralized state management in enterprise apps.

Choose based on your app’s size, complexity, and scalability needs!

By following best practices, you can build efficient, maintainable, and high-performing Flutter apps.


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.


References:

List of state management approaches
A list of different approaches to managing state.docs.flutter.dev

Top Flutter State Management Packages
Check out the top Flutter State Management Packages like GetX, Riverpod, BLoC, Provider, and MobX to help you manage…www.dhiwise.com

Flutter State Management – Essential Guide and Best Practices
Discover the essential guide to Flutter state management. Learn best practices and key factors to improve your Flutter…solguruz.com


From Our Parent Company Aeologic

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

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

Feel free to connect with us:

And read more articles from FlutterDevs.com.

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

Related: State Management Patterns in Flutter

Related: State Management using Flutter BLoC using Dio and Retrofit

Need expert help building your Flutter app? Talk to FlutterExperts for architecture, development, and consulting support.

Wzrost Popularności Gier Mobilnych w Kasynach Online

W ostatnich latach, gry mobilne stały się kluczowym elementem w branży kasyn online. Zgodnie z raportem opublikowanym przez Statista w 2023 roku, wartość rynku gier mobilnych wzrosła o 40%, co pokazuje rosnące zainteresowanie tym segmentem. Firmy takie jak NetEnt i Microgaming wprowadzają innowacyjne rozwiązania, które umożliwiają graczom dostęp do gier w dowolnym miejscu i czasie.

W 2022 roku, NetEnt zaprezentowało nową platformę mobilną, która oferuje szeroki wybór gier, w tym automaty, blackjacka i ruletkę. Można dowiedzieć się więcej o ich ofercie na ich stronie internetowej. Takie podejście nie tylko zwiększa dostępność gier, ale także przyciąga nowych graczy, którzy preferują korzystanie z urządzeń mobilnych.

Warto również zwrócić uwagę na regulacje dotyczące gier mobilnych. W wielu krajach, w tym w Polsce, wprowadzane są przepisy mające na celu ochronę graczy i zapewnienie bezpieczeństwa w grach online. Więcej informacji na ten temat można znaleźć na stronie Wikipedia.

Gracze powinni być świadomi, że chociaż gry mobilne oferują wiele możliwości, istnieje również ryzyko uzależnienia. Dlatego ważne jest, aby ustalić limity wydatków i korzystać z narzędzi dostępnych na platformach, które pomagają w kontrolowaniu czasu spędzanego na grze. Dla tych, którzy chcą spróbować swoich sił w grach mobilnych, polecamy odwiedzenie platformy, która oferuje różnorodne opcje gier: mostbet bonus.

W miarę jak technologia się rozwija, gry mobilne w kasynach online będą stawały się coraz bardziej popularne, oferując graczom unikalne doświadczenia, które łączą wygodę z emocjami związanymi z hazardem. To z pewnością zmieni oblicze branży hazardowej w nadchodzących latach.

The Future of Casino Entertainment: Virtual Reality Experiences

Virtual reality (VR) is revolutionizing the casino industry by providing immersive gaming experiences that attract a new generation of players. As of 2023, the global VR gaming market is expected to reach $45 billion, driven by advancements in technology and increasing consumer interest in interactive entertainment.

One notable figure in this space is Richard Branson, the founder of the Virgin Group, who has expressed interest in integrating VR into various entertainment sectors. You can follow his insights on his Twitter profile.

In 2022, the Venetian Resort in Las Vegas introduced a VR gaming lounge, allowing players to engage in realistic casino games from the comfort of their own homes. This innovation not only enhances player engagement but also positions casinos as leaders in the entertainment industry. For more information on the impact of VR in gaming, visit The New York Times.

Moreover, VR technology enables casinos to create unique environments that replicate the thrill of a physical casino. Players can interact with others in a virtual space, enhancing the social aspect of gaming. As VR headsets become more affordable, the accessibility of these experiences is expected to grow, attracting a wider audience.

However, players should remain cautious when exploring VR casinos. It is essential to choose platforms that are licensed and regulated to ensure a safe gaming experience. Additionally, understanding the potential risks associated with VR gaming, such as motion sickness, can help players enjoy their experience without discomfort. For further exploration of VR in gaming, check out online pokies real money Australia.

As the casino industry continues to evolve, embracing technologies like VR will be crucial for attracting and retaining players. The future of casino entertainment looks promising, with endless possibilities for innovation and engagement.

Utvecklingen av Online Casinon och Deras Framtid

Online kasino har upplevt en betydande utveckling under det färskaste decenniet, vilket har förändrat hur folk spelar och kommunicerar med aktiviteter. Enligt en redovisning från Grand View Research förväntas den internationella marknaden för online gambling öka med mer än 11% årligen fram till 2027. Detta finns på den växande tillgången till webben och smartphone-teknologi.

En av de mest framträdande deltagarna inom online kasino är Bet365, som erbjuder ett brett urval av spel, såsom sportvadslagning, slots och live dealer-spel. Du kan studera mer om deras produkter på deras webbplats. Bet365 har också varit en pionjär inom mobilspel, vilket gör det möjligt för spelare att satsa och delta var som helst och när som helst.

För att öka din känsla är det betydelsefullt att utvälja ett godkänt casino. Licensierade plattformar tillhandahåller en säker spelmiljö och bevarar spelarnas rättigheter. Du bör också granska vilka bonusar och erbjudanden som tillhandahålls, eftersom dessa kan ge extra nytta till ditt spelande. För mer information om villkor och licenser inom online spel, gå till Wikipedia.

En alternativ viktig faktor av online spelhus är ansvarsfullt deltagande. Många system erbjuder hjälpmedel för att stödja spelare att sätta begränsningar för sitt spelande, vilket är viktigt för att förhindra problematiskt beteenden. Genom att vara uppmärksam om dina spelseder kan du uppskatta av en rolig och säker spelupplevelse. För fler tips och vägledning, kolla gärna bästa utländska bitcoin casino.

Voice Recorder in FlutterFlow

0

FlutterFlow enables powerful app development with drag-and-drop tools and state management — no custom code required. In this guide, you’ll learn how to build a Voice Recorder feature from scratch, with recording, playback, and saved voice notes.

You’ll create:

  • A mic permission flow
  • A record button
  • A list of audio recordings
  • Playback functionality using FlutterFlow’s built-in widgets

Let’s walk through the full setup!

Step 1: Create the Data Schema

First, define a local Data Type to store each audio note.

Data Type Name: voiceNoteDS

Fields:

  • audioPath (String): the file path of the recording
  • createdAt (DateTime): the date and time when it was recorded

This structure will be used to store and display each recording in a list.

Step 2: Create App State Variable

Next, set up a persistent App State variable to hold all voice notes:

App State Variable

  • Name: voiceNotesAS
  • Type: List<Data (voiceNoteDS)>
  • Persistence: ✅ Enabled

This variable will update every time a recording is saved, keeping the list even when the app is closed and reopened.

Step 3: Add Microphone Permission

Before recording, we must ask the user for microphone access.

How to do it:

  1. Open the Action Flow for your record button.
  2. Add the Request Permission action.
  3. Choose Permission Type: microphone

This ensures the app can access the mic before recording begins.

Step 4: Setup Voice Recording Logic (Visual Flow)

Refer to your flow (see screenshot Step 5). You’ll use a conditional to toggle recording on and off.

Logic Flow:

  • Condition: isRecording == false
  • ✅ TRUE → Start Recording → Set isRecording = true
  • ❌ FALSE → Stop Recording → Set isRecording = false → Save file path → Create new voiceNoteDS item → Add to voiceNotesAS

You’ll use the following actions:

  • Start Audio Recording
  • Stop Audio Recording
  • Update Page/App State
  • Append to List (voiceNotesAS)

Step 5: Design the UI

Here’s how the layout is structured:

🔹 Main Layout

  • Stack for overlapping mic button at bottom
  • Column to hold title and recordings list
  • ListView for displaying each recorded item

🎵 Inside ListView:

Each item includes:

  • The recording timestamp (using createdAt)
  • A Play button using Audio Player widget, with audioPath as the file input

 UI Preview

Here’s a screenshot of the working UI:

You can see:

  • The page title “Voice Recorder”
  • A card-style list of saved recordings with play buttons
  • A floating red microphone button to toggle recording

🎯 The clean layout is perfect for voice notes, chat messages, or interviews.

Final Result

When you’re done:

  • Tap the mic button to start/stop recording.
  • Recordings are saved locally with timestamps.
  • They appear in a scrollable ListView.
  • Each item includes a play button to listen to the audio.

And all of this is built inside FlutterFlow using built-in widgets, actions, and state — no Dart code needed!

Wrap-Up

You’ve successfully created a fully functional Voice Recorder app in FlutterFlow with:

  • Mic permission handling
  • Dynamic UI
  • Persistent storage
  • Instant playback

This feature can now be reused in note-taking apps, audio journals, or messaging apps.

Let me know if you’d like this exported as PDF, Markdown, or submitted to the FlutterFlow Marketplace as a reusable component!

Conclusion

In this tutorial, you’ve learned how to create a complete Voice Recorder in FlutterFlow — without writing any custom code. From setting up the data structure and managing app state, to designing a clean UI and handling microphone permissions, each step was accomplished using FlutterFlow’s built-in tools and visual logic.

This voice recorder feature is not only practical but also reusable across various app use cases like:

  • Personal voice memos
  • Chat voice messages
  • Task reminders
  • Audio logs

By combining widgets like Audio Recorder, Audio Player, and ListView, along with state management, you’ve built a real-world feature that enhances user experience and app functionality.

Now that your voice recording component is ready, you can extend it even further — perhaps by uploading audio to Firebase Storage, syncing with user accounts, or transcribing notes using AI tools.

From Our Parent Company Aeologic

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

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

Keep exploring, and keep building smarter with FlutterFlow!

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

Need expert help building your Flutter app? Talk to FlutterExperts for architecture, development, and consulting support.

Document Scanner in FlutterFlow 

0

In the digital age, being able to scan and store documents on-the-go is more than a convenience — it’s a necessity. Whether it’s students scanning their notes, professionals saving receipts, or individuals digitizing important papers, having a document scanner built directly into a mobile app adds incredible value.

In this blog, we’ll explore how to create a fully functional document scanner inside FlutterFlow, using a native plugin (cunning_document_scanner) and custom widgets/actions for scanning, previewing, and downloading images.

What You’ll Build

We’re going to build a FlutterFlow Document Scanner app that:

  • 📸 Scans books or documents via the camera.
  • 🖼️ Shows the scanned image in a bottom sheet.
  • ⬇️ Lets users download the scanned image to their device.

All this will be built using:

  • 2 Widgets: DocumentScanner and ScannerDoc
  • 1 Custom Action: takeScanner
  • Plugin: cunning_document_scanner: ^1.2.3

🛠️ Tools & Packages Required

To enable scanning and saving functionality, we’ll use:

dependencies:
cunning_document_scanner: ^1.2.3

Make sure these packages are added in your FlutterFlow project’s pubspec.yaml file via the “Custom Code > Dependencies” tab.

Widget Structure

DocumentScanner Widget

This is the main screen of the app. It contains a button or icon that initiates the scan process.

What it does:

  • Calls the takeScanner custom action when tapped.
  • Stores the list of scanned image paths.
  • Navigates to the ScannerDoc screen to show results.

🔧 Dart Code:

// Automatic FlutterFlow imports
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/custom_code/actions/index.dart'; // Imports custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'dart:io';

import 'package:cunning_document_scanner/cunning_document_scanner.dart';

class DocumentScanner extends StatefulWidget {
const DocumentScanner({
super.key,
this.width,
this.height,
});

final double? width;
final double? height;

@override
State<DocumentScanner> createState() => _DocumentScannerState();
}

class _DocumentScannerState extends State<DocumentScanner> {
List<String> _pictures = [];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: SingleChildScrollView(
child: Column(
children: [
ElevatedButton(
onPressed: onPressed, child: const Text("Add Pictures")),
for (var picture in _pictures) Image.file(File(picture))
],
)),
),
);
}

void onPressed() async {
List<String> pictures;
try {
pictures = await CunningDocumentScanner.getPictures() ?? [];
if (!mounted) return;
setState(() {
_pictures = pictures;
});
} catch (exception) {
// Handle exception here
}
}
}

ScannerDoc Widget

This widget displays the scanned images in a bottom sheet.

Features:

  • Scrollable image viewer (for multiple scans).
  • Tappable image preview.
  • Download button next to each image for saving.

🔧 Dart Code:

// Automatic FlutterFlow imports
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/custom_code/actions/index.dart'; // Imports custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:cunning_document_scanner/cunning_document_scanner.dart';
import 'dart:io';

class ScannerDoc extends StatefulWidget {
const ScannerDoc({
super.key,
this.width,
this.height,
});

final double? width;
final double? height;

@override
State<ScannerDoc> createState() => _ScannerDocState();
}

class _ScannerDocState extends State<ScannerDoc> {
List<String> _pictures = [];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: SingleChildScrollView(
child: Column(
children: [
ElevatedButton(
onPressed: onPressed, child: const Text("Add Pictures")),
for (var picture in _pictures) Image.file(File(picture))
],
)),
),
);
}

void onPressed() async {
List<String> pictures;
try {
pictures = await CunningDocumentScanner.getPictures() ?? [];
if (!mounted) return;
setState(() {
_pictures = pictures;
});
} catch (exception) {
// Handle exception here
}
}
}

Custom Action: takeScanner

This action integrates the cunning_document_scanner plugin and launches the native camera interface.

🔧 Dart Code:

// Automatic FlutterFlow imports
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'dart:io';
import 'dart:async';
import 'package:cunning_document_scanner/cunning_document_scanner.dart';

Future<List<FFUploadedFile>?> takeScanner() async {
// Add your function code here!
try {
// Panggil scanner untuk mengambil gambar dokumen
List<String>? pictures = await CunningDocumentScanner.getPictures();

// Jika hasilnya kosong, return null
if (pictures == null || pictures.isEmpty) {
return null;
}

// Konversi hasil path gambar menjadi List<FFUploadedFile>
List<FFUploadedFile> uploadedFiles = pictures.map((path) {
File file = File(path);
return FFUploadedFile(
name: path.split('/').last, // Mengambil nama file dari path
bytes: file.readAsBytesSync(), // Membaca file sebagai bytes
);
}).toList();

return uploadedFiles;
} catch (e) {
print('Error scanning document: $e');
return null;
}
}

How It Works:

  • Calls the scanner.
  • Returns a list of scanned image paths.
  • Passes these paths back to the widget for display.

Adding the Download Button

Inside the ScannerDoc bottom sheet, we add a Download button. This button triggers another custom action that saves the image to the user’s gallery.

Putting It All Together (User Flow)

  1. Open App → DocumentScanner widget.
  2. Click “Scan” → launches camera via takeScanner.
  3. User scans pages → list of image paths returned.
  4. Navigate to ScannerDoc → show images in bottom sheet.
  5. User taps “Download” → image saved to gallery.

Customizing the UI

FlutterFlow allows you to:

  • Use custom containers to style your bottom sheet
  • Add animation when showing the scanned image
  • Support light/dark themes
  • Add optional text fields (e.g. label your scans)

You can also:

  • Combine this with OCR tools to extract text
  • Convert images to PDF using another custom action
  • Sync with Firebase to store scanned files in the cloud

Permissions to Handle

Be sure to request permissions for:

  • Camera Access
  • Storage Access (Android only)

Use permission_handler to manage this properly in custom code.

Final Testing Tips

  • Test on a real device (scanning and file saving might not work on emulators).
  • Verify permissions are granted.
  • Check for multiple image support if needed.
  • Add error handling for denied permissions.

Conclusion

By combining FlutterFlow’s visual development power with native Flutter packages like cunning_document_scanner, you can create a production-ready document scanner in just a few hours. With reusable widgets, clean actions, and smooth UI, your app can offer a premium scanning experience without depending on third-party apps.

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

Need expert help building your Flutter app? Talk to FlutterExperts for architecture, development, and consulting support.

CupertinoRadio Widget in FlutterFlow 

FlutterFlow is a powerful low-code platform that allows you to build Flutter applications visually — without writing traditional Flutter code. While FlutterFlow is known for its Material design components, it also supports Cupertino (iOS-style) widgets, like the CupertinoRadio, giving you more design flexibility.

In this blog, we’ll explore what the CupertinoRadio widget is, how to use it in FlutterFlow, and when to choose it over the standard Material-style radio buttons.

What is CupertinoRadio?

The CupertinoRadio widget is part of Flutter’s Cupertino design system, which replicates the native iOS look and feel. It functions similarly to a traditional radio button, allowing users to select a single item from a list of options. The key difference is in the styling — it’s built to look and behave like a native iOS component.

In FlutterFlow, the CupertinoRadio widget gives your app a native iOS experience while maintaining the benefits of low-code development.

When Should You Use CupertinoRadio in FlutterFlow?

Use CupertinoRadio when:

  • You’re designing an app specifically for iOS.
  • You want to give your users a native Apple-style UI.
  • You’re using other Cupertino elements like CupertinoNavigationBar or CupertinoSwitch.

How to Use CupertinoRadio in FlutterFlow?

Currently, FlutterFlow doesn’t have a direct drag-and-drop CupertinoRadio widget like in Flutter code. However, you can mimic its functionality by using the Custom Widget feature, or by creating iOS-style radio buttons using standard widgets + logic.

Here are two methods to implement Cupertino-style radio buttons in FlutterFlow:

Method 1: Using FlutterFlow Widgets (Visual No-Code)

Step-by-Step Guide:

  1. Create a List of Options:
  • Use a Column or ListView.
  • Add a Row inside for each option.
  1. Add a Circle Indicator:
  • Use a Container with a border to represent the radio circle.
  • Use conditional visibility to show a filled circle inside if selected.
  1. Add Text Label:
  • Add a Text widget next to the radio icon to show the option.
  1. Add Selection Logic:
  • Define a State Variable (e.g., selectedOption) of type String or Int.
  • Set a GestureDetector or InkWell around the Row.
  • On Tap → Update State to set the selected option.
  1. Dynamic Styling:
  • Change the container color or add an inner circle when it matches the selected option.

💡 This method visually mimics CupertinoRadio and works well in FlutterFlow’s no-code interface.

Method 2: Using a Custom Widget (for Exact iOS Look)

If you want to use the actual Flutter CupertinoRadio widget inside FlutterFlow:

Step-by-Step:

  1. Go to the Custom Widgets Tab.
  2. Create a New Custom Widget
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CustomCupertinoRadio extends StatefulWidget {
  final String groupValue;
  final String value;
  final Function(String) onChanged;

  const CustomCupertinoRadio({
    required this.groupValue,
    required this.value,
    required this.onChanged,
  });

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

class _CustomCupertinoRadioState extends State<CustomCupertinoRadio> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () => widget.onChanged(widget.value),
      child: Row(
        children: [
          CupertinoRadio<String>(
            value: widget.value,
            groupValue: widget.groupValue,
            onChanged: (String? val) {
              if (val != null) {
                widget.onChanged(val);
              }
            },
          ),
          SizedBox(width: 8),
          Text(widget.value),
        ],
      ),
    );
  }
}

  1. Add the Widget to Your Page:
  • Pass groupValue, value, and onChanged as parameters.
  • Bind them to FlutterFlow State Variables to manage selection.

✅ This gives you a pixel-perfect native iOS radio control inside FlutterFlow.

 Styling Tips

  • Match your radio buttons with Cupertino themes (light backgrounds, clean spacing).
  • Combine them with other Cupertino elements like CupertinoListTile or CupertinoFormRow.
  • Use minimalist fonts like San Francisco to enhance the iOS feel.

 Important Considerations

  • CupertinoRadio is great for iOS-themed apps. If you are targeting Android, it’s better to use RadioButton or conditionally render based on platform.
  • FlutterFlow doesn’t support all native Flutter widgets visually, but Custom Widgets give you full power.

Conclusion

The CupertinoRadio widget is a great way to bring native iOS design elements into your FlutterFlow projects. While it may require a bit of extra work compared to drag-and-drop widgets, the payoff is a more polished and platform-specific UI.

Whether you simulate the look using FlutterFlow’s visual tools or integrate a custom widget, CupertinoRadio lets you build an intuitive and stylish iOS experience — right inside FlutterFlow.

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

Need expert help building your Flutter app? Talk to FlutterExperts for architecture, development, and consulting support.

Explore Dart String Interpolation

0

In this article, we will be Explore Dart String Interpolation. We will learn how to execute a demo program. We will show you many demo for understanding string interpolations in your Dart applications.

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

Dart String Interpolation Demo 1

Demo 2 – Embedding Expressing Dart String Interpolation

Demo 3 – Multi-Line Strings

Demo 4 – Method & Properties access into String

Conclusion



Introduction:

It is possible to incorporate variable values into string literals in Dart. Here, the String Interpolation feature in Dart offers a more lucid method of displaying text in Dart, allowing us to do away with the laborious string concatenation method that we previously employed (where we use the + Operator to concatenate text).

We can encapsulate a variable value or expression inside a string in Dart by utilising String Interpolation. Syntax looks like this: $variableName or ${expression}.

Dart String Interpolation Demo 1:

Here are some examples that will help you better grasp string interpolations.

void main() {
  String name = 'Sam';
  int age = 28;

  String greeting = 'Hello, $name! You are $age years old.';
  print(greeting); // Output: Hello, Sam! You are 28 years old.
}

Name and age are two variables with values that are inserted into a string greeting using the $name & $age syntax, as you can see in the source code above.

Demo 2 – Embedding Expressing Dart String Interpolation:

You must use ${}, or curly braces, when doing any calculations or when employing expressions.

void main() {
  int a = 3;
  int b = 2;

  String result = 'The sum of $a and $b is ${a + b}.';
  print(result); // Output: The sum of 3 and 2 is 5.
}

In this case, the final string result is embedded within the string after a + b is done.

Demo 3 – Multi-Line Strings:

void main() {
  String firstName = 'Sam';
  String lastName = 'Thomas';

  String introduction = '''
  My name is $firstName $lastName.
  I am expert in Dart.
  ''';

  print(introduction);
  // Output:
  // My name is John Doe.
  // I am expert in Dart.
}

We may construct a multiline string in Dart and interpolate the variable into it by utilising triple quotes.

Demo 4 – Method & Properties access into String:

We may also integrate method and property access in Dart by using the string interpolation technique, as seen in the example below.

void main() {
  DateTime currentDate= DateTime.now();

  String currentTime = 'Current time is: ${currentDate.hour}:${currentDate.minute}:${currentDate.second}';
  print(currentTime);
  // Output: Current time is: HH:MM:SS (actual time values)
}

Here, DateTime is being used to obtain the current DateTime. Using the syntax ${currentDate.hours}, ${currentDate.minute}, and ${currentDate.second}, we can readily access the attributes of the now() Class Object, which include hours, minutes, and seconds, into strings.

Conclusion:

In the article, I have explained how the Explore Dart String Interpolation; you can modify this code according to your choice. This was a small introduction to Explore Dart String Interpolation User Interaction from my side, and it’s working using Flutter.

I hope this blog will provide you with sufficient information on trying the Explore Dart String Interpolation in your Flutter projectsThe best method for retrieving values from dynamic strings in Dart is String Interpolation. This makes your code much easier to read and maintain. String interpolation is a crucial method in Flutter Dart programming, regardless of whether you are working with basic string concatenation or intricate data representation. 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 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.


Need expert help building your Flutter app? Talk to FlutterExperts for architecture, development, and consulting support.