Google search engine
Home Blog Page 59

Explore Ripple Into Page In Flutter

0

Flutter makes beautiful animations very simple and attractive likewise the truth is that we developers are afraid to push ourselves to the next level by including all those little animations that make our app stand out rather than beautiful. When we tune a component in a material design, it becomes very easy to be buddy with the ripples animation.

In this blog, we will explore Explore Ripple Into Page In Flutter. We will also implement a demo of the Explore Ripple Into Page In Flutter and how to use them in your flutter applications. So let’s get started.


Table of Contents :

Flutter

Explore Ripple Into Page In Flutter

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

Ripple Into Page :

Flutter makes beautiful animations easy. That’s the fact. We as developers are also scared to push our apps to the next level by adding those minor animations that make the app beautiful instead of just pretty. Let’s change it together! In this post, I’d like to show you how we can add a ripple effect that may make your client say “I like that!”.

Implementation :

Let us now see how we add all these packages to our pubspec.

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies :dependencies:
ripple_navigation: ^1.0.5

Step 1: Install :

You can install packages from the command line:

flutter pub get

Step 2: Importing :

import 'package:ripple_navigation/ripple_navigation.dart';

Step 3: Enable AndriodX :

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Code Implementation :

You need to implement it in your code respectively:

Before exploring the ripple page, we will create a controller inside the Globalkey, which we will define inside an animateRipple() method, whose controller type we can change according to us, as an example, the code is referenced below.

GlobalKey<RippleLocationState> rippleController = GlobalKey();

void animateRipple(){
rippleController.currentState!.forwardRipple();
}

Now to navigate to the next page with wave transition we have created an onPressed() method in which we use the pushRippleTransitionPage() method from the controller() inside which we have defined the second page which will send us from the first page to the second page.

For Example:

void onPressed() {
rippleController.currentState!.pushRippleTransitionPage(
context,
SecondScreen(),
);
}

After this we will define the center property inside a stateful widget, inside it, we will define the RippleLocation widget in which we will create a button, inside its onPressed() method, we will call the onPressedButton() method which will send us to the next page and we will in the RippleLocation() We also defined its property rippleController so that our ripple animate will display.

RippleLocation(
rippleController: rippleController,
child: RaisedButton(
padding: const EdgeInsets.all(12),
textColor: Colors.white,
color: Colors.green,
onPressed: () {
onPressedButton();
},
child: Text('Click Button'),
),
),

As we move from the first screen to the second screen we see ripple animation is displayed on the screen and send to the second screen on the second screen I have displayed an image and as soon as we click on the arrow of appBar then it sends us back to the first screen as I have given below code reference.

Center(
child: Padding(
padding: EdgeInsets.all(15),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10)),
child: Image.asset(
'assets/images/furniture.png',
height: 200,
fit: BoxFit.cover,
width: 1000,
),
),
),
),

Code File :

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

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

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: RippleFirstScreen(),
);
}
}

class RippleFirstScreen extends StatefulWidget {
@override
_RippleFirstScreenState createState() => _RippleFirstScreenState();
}

class _RippleFirstScreenState extends State<RippleFirstScreen> {
GlobalKey<RippleLocationState> rippleController = GlobalKey();

void animateRipple() {
rippleController.currentState!.forwardRipple();
}

void onPressed() {
rippleController.currentState!.pushRippleTransitionPage(
context,
SecondScreen(),
);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Ripple Demo'),
),
body: Center(
child: RippleLocation(
rippleController: rippleController,
child: RaisedButton(
// disabledColor: Colors.red,
// disabledTextColor: Colors.black,
padding: const EdgeInsets.all(12),
textColor: Colors.white,
color: Colors.green,
onPressed: () {
onPressed();
},
child: Text('Click Button'),
),
),
),
/*floatingActionButton: RippleLocation(
rippleController: rippleController,
child: FloatingActionButton(
onPressed: onPressed,
tooltip: 'Increment',
child: Icon(Icons.add),
),
),*/
);
}
}

class SecondScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Second Screen'),
backgroundColor: Colors.lightBlue,
),
body: Center(
child: Padding(
padding: EdgeInsets.all(15),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10)),
child: Image.asset(
'assets/images/furniture.png',
height: 200,
fit: BoxFit.cover,
width: 1000,
),
),
),
),
);
}
}

Conclusion :

In this article, I have explained Explore Ripple Into Page In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Explore Ripple Into Page In Flutter demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Explore Ripple Into Page In Flutter in your flutter project. We showed you what the Explore Ripple Into Page In Flutter 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.

Flutter integration tests on Firebase Test Lab

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, there will be some problems or bugs in the code that 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.

By the way, Flutter has the ability to easily test any application. The ability is that they work the way we want them on a target platform. Dart testing works well for unit and non-UI testing; It runs on the development machine and does not depend on the GUI of the Flutter application

Hello friends, I will talk about my new blog on Flutter integration tests on Firebase Test Lab. We will also implement Flutter integration tests on the Firebase Test Lab demo, and use them in your flutter applications. So let’s get started.


Table Of Contents :

Flutter

Integration Tests

Firebase Test Lab

Implementation

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

What is Integration Test:

We use integration testing to learn how different parts work together. Unlike unit tests, it is intended to be run on devices (physical or virtual) and is used for end-to-end testing in addition to testing individual components. Due to this, these tests are much slower than unit tests, but they are a great way to test whether our app works correctly in real-life scenarios. It is called a test because we use the flutter_driver package and the flutter drive command line to run its GUI.

What is Firebase Test Lab:

Running integration tests is a great way to test our apps, but the equipment we have is limited. Either physical devices can be emulators or simulators, but most of them we need to set up to run tests on our machines. Will have to do This can be problematic if testing has to be done separately on multiple devices. For this we can connect with Firebase Test Lab in this we have access to thousands of devices hosted by Google with different device configurations. All these devices are stored in the cloud, so we can access them remotely. We just need to upload the APK of our app for testing and Firebase will run it.

Implementation:

You need to implement it in your code respectively :

Step 1: Add dependencies.

Add dependencies to pubspec — yaml file.

First, we will add flutter_localization and intl library to pubspec. yaml.

  dependencies:integration_test: ^1.0.2+3

Step 2: import the package :

import 'package:integration_test/integration_test.dart';

Step 3: Enable AndriodX

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Started with integrations tests:

First we need to add IntegrationTestWidgetsFlutterBinding.ensureInitialized() to the method, to add support for integration testing. Because we need this method to initialize the flutter test environment.

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

import 'package:flutter_integration_test_lab/main.dart';
import 'package:integration_test/integration_test.dart';

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);

// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();

// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

Test Running on your machine:

Now for us to run the test on our machine, first we need to create an entry point for the test driver script. To create this we have first created a package named test_driver, inside it, we will create a new file named integration_test.dart and paste it. Which is given in the below code reference.

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();

This calldriver for text integration is a feature wrapper around the integrationdriver plugin that enables it to run new tests with the flutter drive command.

$ flutter drive \
--driver=test_driver/integration_test.dart \
--target=test/widget_integration_test.dart

Running Test on Firebase test lab:

Now we will first create a project in the Firebase console for the firebase test lab we don’t need to set up android and ios apps.

Now you can go and set up either Android, iOS, or both apps and prepare them to upload to Firebase Test Lab.

Android Setup:

Now we will set up Android, to set up this we will create a new file android/app/src/androidTest/java/your/package/yourapp/MainActivityTest.java.

package com.pszklarska.flutter_integration_test;

import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.integration_test.FlutterTestRunner;
import org.junit.Rule;
import org.junit.runner.RunWith;

@RunWith(FlutterTestRunner.class)
public class MainActivityTest {
@Rule
public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
}

After That, we will run the build. Gradle file for the test of android. Android will add a dependency for testing which will help us to test.android {

defaultConfig {
...
applicationId "com.example.flutter_integration_test_lab"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}

dependencies {
...
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

After all, this is set up you can generate the test build with some of the following instrumentation commands given below.

pushd android
flutter build apk
./gradlew app:assembleAndroidTest
./gradlew app:assembleDebug -Ptarget=test/widget_test.dart
popd

Now you will see that as soon as we click on Test Lab a screen opens and in this we click on Browse APK and go to /build/app/outputs/apk/debug/app-debug.apk in our project and Clicking on it then generates this file.

It automatically starts Robo testing as soon as our project is uploaded.

Now we will click on run test in test lab screen in which a pop will open then we will click on instrumentation as we click on it then the instrumentation test screen opens in which you have to upload two already generated apk.

  1. The App apk located in/build/app/outputs/apk/debug/app-debug.apk.

2. The Test app is located in /build/app/outputs/apk/androidTest/app-debug-androidTest.apk.

After that, we will select our devices and after continuing with this our test will start running. After some time its result will be visible.

Conclusion:

In this article, I have explained Flutter integration tests on Firebase Test Lab, which you can modify and experiment with according to your own, this little introduction was from the Flutter integration tests on Firebase Test Lab.

I hope this blog will provide you with sufficient information on Trying up the Flutter integration tests on Firebase Test Lab. How to integrate flutter to the existing android app? 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.

Flutter V.I.P.E.R Pattern Architecture

0

Architecture is basically defining the flow of code into layers…

The VIPER architectural pattern is an option in contrast to MVC or MVVM. And keeping in mind that the SwiftUI and Combine systems make an incredible blend that takes care of building complex UIs and moving information around an application, they likewise accompany their own difficulties and conclusions about architecture.

Let’s dig into VIPER Pattern



VIPER: View, Interactor, Presenter, Entity, and Router Model

VIPER is an architectural pattern like MVC or MVVM, yet it isolates the code further by single duty. Apple-style MVC persuades developers to place all rationale into a UIViewController subclass. VIPER, as MVVM before it, tries to fix this issue.

VIPER architecture has 5 parts “View “, “ Interactor “, “Presenter”, “ Entity”, and “Router Modeland” it’s based on the Single Responsibility Principle which provides it with smooth and clean functionality. VIPER offers an approach to building apps with a clean architecture that effectively separates the different functions and responsibilities required, such as the user interface, business logic, data storage, and networking. These are then easier to test, maintain and expand.

VIPER offers a good layer of abstraction resulting in a more scalable and testable code.

  • It simplifies complex projects hence making it an ideal choice for large teams.
  • It makes the process scalable and enables developers to work simultaneously on a project.

VIPER is an acronym for View-Interactor-Presenter-Entity-Router. Each functionality or module must be defined by these five components.

The integral parts of a VIPER architecture are mentioned below:

> View:

The View is the user interface. It’s responsible for displaying things as directed by the presenter and sends the actions taken by the user to the presenter

> Interactor:

The Interactor is responsible for interacting between the presenter(business logic layer) and the data(domain layer).

> Presenter:

This is our Business logic layer. Directing data between UI layer and Interactor Layer and taking user actions and calling to the router to move the user between views.

> Entity:

It’s the information and data used on the functionality. In our case, it will be CoreData since our information will be stored there.

> Router :

It stores the navigation logic used for describing which screens need to be displayed.

In VIPER Only the presenter talks to the view, and only the interactor talks to the model (entity). The presenter and interactor coordinate with each other. The presenter is concerned with display and user action, and the interactor is concerned with manipulating the data.

Comparison with MVVM:

A design pattern that offers a similar level of abstraction is MVVM (Model-View-ViewModel). Between both patterns, we can identify the similarities, for example:

  • The View on MVVM is the View on VIPER;
  • The Model on MVVM is the Entity on VIPER;

When to use VIPER Pattern?:

  • When you want to keep all the modules isolated.
  • When we want a good testing environment
  • Should be used only when the developers completely understand the project.

VIPER also has some disadvantages too:

  • Generates a lot of boilerplate code, making the initial development phase slower.
  • When the application requirements are well-formed.
  • Should be used only when the developers completely understand the project

Link for Repository :

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

❤ ❤ Thanks for reading this article ❤❤

If you find anything that could be improved please let me know, 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!


Image Parallax Scrolling Effect In Flutter

0

The flutter widget is built using a modern framework. It is like a reaction. In this, we start with the widget to create any application. Each component in the screen is a widget. The widget describes what his outlook should be given his present configuration and condition. Widget shows were similar to its idea and current setup and state. Flutter is a free and open-source tool to develop mobile, desktop, web applications with a single code base.

Hello friends, I will talk about my new blog on Image Parallax Scrolling Effect In Flutter. We will also implement an Image Parallax Scrolling Effect Flutter demo, describe his properties, and use them in your flutter applications. So let’s get started.


Table Of Contents :

Image Parallax Scrolling Effect

Code Implement

Code File

Conclusion


Image Parallax Scrolling Effect :

The use of Image Parallax Scrolling when we scroll down the list of any image, then we see that the image also appears scrolling upwards at a very slow speed, as soon as we scroll the image list from the bottom. It then slows down in its position as if the card in the list is in the foreground, an effect known as parallax.

Code Implement :

You need to implement it in your code respectively:

First of all, we have taken a listview builder to show the image parallax scrolling image in the list inside which the image and its title have been defined.

ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: locations.length,
itemBuilder: (BuildContext context, int index) {
return _buildEssentialsBeginnersModel(locations[index], index);
},
),

After this, we have created a model class named ImageList to show the items in the list in which Image and Title are two values.

class ImageList {
const ImageList({
required this.title,
required this.imageUrl,
});

final String title;
final String imageUrl;
}
const imageList = [
ImageList(
title: 'U.S.A',
imageUrl: 'assets/images/boston1.jpg',
),
ImageList(
title: 'Singapore',
imageUrl: 'assets/images/boston2.jpeg',
),
ImageList(
title: 'Peru',
imageUrl: 'assets/images/business.jpeg',
),
];

After creating the model class, we have created a class named ParallaxFlowDelegate to parse the image, which extends from FlowDelegate, inside this class, the scrolling position of the list and the vertical alignment of the list, etc. have been defined, which is the background of the image in the background of the image. the effect will be visible.

Now we will initialize the ParallaxFlowDelegate in the item list of the Image. To show the items of the list, we have created a method in the listview named _buildImageModel inside which we have used the Stack() Widget in which we have defined the ParallaxFlowDelegate in the delegate property of the Flow() Widget which has scrollable. Properties like listItemContext, scrollable, backgroundImageKey have been used which gives a parallax effect to the card inside the image.

Flow(
delegate: ParallaxFlowDelegate(
scrollable: Scrollable.of(context)!,
listItemContext: context,
backgroundImageKey: _backgroundImageKey,
),
children: [
Image.asset(
imageUrl,
key: _backgroundImageKey,
fit: BoxFit.cover,
),
],
)

Code File :

import 'package:flutter/material.dart';
import 'package:flutter_parallax_effect_demo/Data/data.dart';
import 'package:flutter_parallax_effect_demo/main.dart';
import 'package:flutter_parallax_effect_demo/widget.dart';
class ExampleParallax extends StatelessWidget {
const ExampleParallax({
Key? key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
child:ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: locations.length,
itemBuilder: (BuildContext context, int index) {
return _buildEssentialsBeginnersModel(locations[index], index);
},
),
);
}

Widget _buildEssentialsBeginnersModel(Location items, int index) {
return LocationListItem(
imageUrl: items.imageUrl,
name: items.name,
country: items.place,
);
}
}

class LocationListItem extends StatelessWidget {
LocationListItem({
Key? key,
required this.imageUrl,
required this.name,
required this.country,
}) : super(key: key);

final String imageUrl;
final String name;
final String country;
final GlobalKey _backgroundImageKey = GlobalKey();

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
child: AspectRatio(
aspectRatio: 16 / 9,
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Stack(
children: [
_buildParallaxBackground(context),
_buildGradient(),
_buildTitleAndSubtitle(),
],
),
),
),
);
}

Widget _buildParallaxBackground(BuildContext context) {
return Flow(
delegate: ParallaxFlowDelegate(
scrollable: Scrollable.of(context)!,
listItemContext: context,
backgroundImageKey: _backgroundImageKey,
),
children: [
Image.network(
imageUrl,
key: _backgroundImageKey,
fit: BoxFit.cover,
),
],
);
}

Widget _buildGradient() {
return Positioned.fill(
child: DecoratedBox(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.transparent, Colors.black.withOpacity(0.7)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
stops: [0.6, 0.95],
),
),
),
);
}

Widget _buildTitleAndSubtitle() {
return Positioned(
left: 20,
bottom: 20,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
country,
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
),
],
),
);
}
}

Conclusion :

In this article, I have explained Image Parallax Scrolling Effect In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Image Parallax Scrolling Effect In Flutter demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Explore Image Parallax Scrolling Effect In Flutter in your flutter project. We showed you the Explore Image Parallax Scrolling Effect In Flutter 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.

Glassmorphism Card In Flutter

0

Glassmorphism is a user interface (UI) trend of cards in Flutter and a very important component of website consent and achievement. It is very responsive to changes in UI patterns and styles and various evolving styles. Influenced UI Glassmorphism has overwhelmed the most recent UI patterns. This style has been used in a variety of products such as the Apple Ios 7, Windows Vista, etc. Glassmorphism is a form of transparency.

In this blog, we will explore Glassmorphism Card In Flutter. We will also implement a demo of the Glassmorphism Card In Flutter. How to use them in your flutter applications. So let’s get started.


Table Of Contents :

Glassmorphism Card

Implementation

Code Implement

Code File

Conclusion


Glassmorphism Card :

Using the Glassmorphism card, we blur the background of the UI and at the same time apply it to the virtual glass as it is a multi-layered methodology to make it appear as if the item is skimming through space The fuzzy effect is highlighted with energetic tones. This pattern is quickly gaining prominence as it is an open-source UI development kit from Flutter so we can use it for UI design for different platforms.

Implementation :

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies :

dependencies:
glassmorphism: ^2.0.1

Step 2: Importing

import 'package:glassmorphism/glassmorphism.dart';

Step 3: Enable AndriodX

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Code Implementation :

You need to implement it in your code respectively:

Before exploring the Glassmorphism card, we have created a dart file, inside the body part of which we have taken a container widget, which we have given a gradient color to its background using the decoration property.

Positioned(
top: constraints.maxHeight * 0.19,
left: constraints.maxWidth * 0.01,
child: Container(
height: constraints.maxHeight * 0.20,
width: constraints.maxWidth * 0.35,
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [
Colors.deepPurpleAccent,
Colors.purple
],
radius: 0.7,
),
shape: BoxShape.circle),
)),

Now we took a Center() widget inside the container which when we use any widget then it will display in the center. Now we will use GlassMorphicContainer inside the center widget which is a kind of plugin, in we have given its height, width and have defined blur, borderRadius size in it, in this, we have given its shape like a credit card and some of it Test defined so that our card looks good.

GlassmorphicContainer(
height: _height * 0.3,
width: _width * 0.9,
borderRadius:15,
blur: 15,
alignment: Alignment.center,
border: 2,
linearGradient: LinearGradient(
colors: [
Colors.white.withOpacity(0.2),
Colors.white38.withOpacity(0.2)
],
begin: Alignment.topLeft,
end: Alignment.bottomRight),
borderGradient: LinearGradient(colors: [
Colors.white24.withOpacity(0.2),
Colors.white70.withOpacity(0.2)
]),
child: Container(
decoration: BoxDecoration(boxShadow: [
BoxShadow(
blurRadius: 16,
spreadRadius: 16,
color: Colors.black.withOpacity(0.1),
)
]),
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 20.0,
sigmaY: 20.0,
),
child: Container(
height: _height * 0.7,
width: _width * 0.9,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
width: 1.5,
color: Colors.white.withOpacity(0.2),
)),
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('ICICI BANK', style: TextStyle(color: Colors.white.withOpacity(0.75))),
Icon(Icons.credit_card_sharp, color: Colors.white.withOpacity(0.75),)
],
),
Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('VISA', style: TextStyle(color: Colors.white.withOpacity(0.75))),
Text('09/27', style: TextStyle(color: Colors.white.withOpacity(0.75))),
],
),
SizedBox(height:10,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('3648 3847 9283 1482', style: TextStyle(color: Colors.white.withOpacity(0.75))),
],
)
],
),
)
),
),
),
),
)

Code File :

import 'dart:ui';

import 'package:flutter/material.dart';

import 'package:glassmorphism/glassmorphism.dart';

class GlassMorphismDemo extends StatefulWidget {
@override
_GlassMorphismDemoState createState() => _GlassMorphismDemoState();
}

class _GlassMorphismDemoState extends State<GlassMorphismDemo> {
late double _height;
late double _width;

@override
Widget build(BuildContext context) {
_height = MediaQuery.of(context).size.height;
_width = MediaQuery.of(context).size.width;
return Scaffold(
appBar: AppBar(
elevation: 0.0,
title: Text('Glassmorphic Card Demo'),
),
body: Container(
height: _height,
width: _width,
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [Colors.green, Colors.blue, Colors.orange, Colors.pink],
stops: [0.2, 0.5, 0.7, 1],
center: Alignment(0.1, 0.3),
focal: Alignment(-0.1, 0.6),
focalRadius: 2,
),
),

// building the layout
child: Center(
child: GlassmorphicContainer(
height: _height * 0.3,
width: _width * 0.9,
borderRadius: 15,
blur: 15,
alignment: Alignment.center,
border: 2,
linearGradient: LinearGradient(colors: [
Colors.white.withOpacity(0.2),
Colors.white38.withOpacity(0.2)
], begin: Alignment.topLeft, end: Alignment.bottomRight),
borderGradient: LinearGradient(colors: [
Colors.white24.withOpacity(0.2),
Colors.white70.withOpacity(0.2)
]),
child: Container(
decoration: BoxDecoration(boxShadow: [
BoxShadow(
blurRadius: 16,
spreadRadius: 16,
color: Colors.black.withOpacity(0.1),
)
]),
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 20.0,
sigmaY: 20.0,
),
child: Container(
height: _height * 0.7,
width: _width * 0.9,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.2),
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
width: 1.5,
color: Colors.white.withOpacity(0.2),
)),
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text('ICICI BANK',
style: TextStyle(
color:
Colors.white.withOpacity(0.75))),
Icon(
Icons.credit_card_sharp,
color: Colors.white.withOpacity(0.75),
)
],
),
Spacer(),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text('VISA',
style: TextStyle(
color:
Colors.white.withOpacity(0.75))),
Text('09/27',
style: TextStyle(
color:
Colors.white.withOpacity(0.75))),
],
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text('3648 3847 9283 1482',
style: TextStyle(
color:
Colors.white.withOpacity(0.75))),
],
)
],
),
)),
),
),
),
),
),
));
}
}

Conclusion:

In this article, I have explained Glassmorphism Card In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Glassmorphism Card In Flutter demo from our side.

I hope this blog will provide you with sufficient information on Trying up the Glassmorphism Card In Flutter in your flutter project. We showed you what the Glassmorphism Card In Flutter 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 Flutter Encrypt & Decrypt PDF Files

Flutter is a portable UI toolkit. In other words, it’s a comprehensive app Software Development toolkit (SDK) that comes complete with widgets and tools. Flutter is a free and open-source tool to develop mobile, desktop, web applications. Flutter is a cross-platform development tool. This means that with the same code, we can create both ios and android apps. This is the best way to save time and resources in our entire process. In this, hot reload is gaining traction among mobile developers. Allows us to quickly see the changes implemented in the code with hot reload.

In this article, we will explore the Explore Flutter Encrypt &Decrypt PDF Files using the Syncfusion_flutter_pdf_file_package. With the help of the package, this user can encrypt and decrypt PDF documents in a flutter. So let’s get started.


Table Of Contents :

Encrypt and Decrypt PDF

Code Implement

Code File

Conclusion


Encrypt and Decrypt PDF :

Encrypt PDF files allows to protect the user from unauthorized access to PDF documents As data theft has become a big problem nowadays, it is necessary to secure the files before sending them to prevent unauthorized access to their data to the recipient. Happens if a PDF document is encrypted then we will decrypt it first to access its data content.

Provides two types of passwords to protect PDF files.

  • Document open password: Document Open Password Encrypts the PDF document with the user password that is required to open the PDF document.
  • Permission Passwords are used to limit access permissions to tasks such as printing, editing, and copying PDF document content

Implementation :

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies :

dependencies:
syncfusion_flutter_pdf: ^19.2.48-beta
open_file: ^3.0.1
path_provider: ^1.6.5

Step 2: Importing

import 'package:syncfusion_flutter_pdf/pdf.dart';
import ‘dart:io’;
import ‘package:open_file/open_file.dart’;
import ‘package:path_provider/path_provider.dart’;

Step 3: Enable AndriodX

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Code Implement :

Before explaining about encrypt and decrypt the pdf file, we will create a new dart file inside which we will take the column widget and create three different buttons inside it, on the click of each button it will show a different example.

Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
onPressed:securePdf, child: Text('Encrypt PDF'),
),

FlatButton(onPressed: securePdf, child: Text('Encrypt PDF')),
FlatButton(
onPressed: restrictPermissions,
child: Text('Restrict Permissions')),
FlatButton(onPressed: decryptPDF, child: Text('Decrypt PDF')),
]),

After defining the button we will first click on the button Encrypt PDF which onPressed has a defined method named securePDF() which loads the PDF document and opens the file of the PDF document in which it is saved.

Future<void> securePdf() async {
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('credit_card_statement.pdf'));
document.security.userPassword = 'password@123';
List<int> bytes = document.save();
document.dispose();
_launchPdf(bytes, 'secured.pdf');
}

It has the _readDocumentData method which is used to read a PDF document of list type from the folder in which it is saved, the reference to the code below is included.

Future<List<int>> _readDocumentData(String name) async {
final ByteData data = await rootBundle.load('assets/$name');
return data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
}

Now we will use the below code reference to get the directory path to launch the PDF document.

Future<void> _launchPdf(List<int> bytes, String fileName) async {
Directory directory = await getExternalStorageDirectory();
String path = directory.path;
File file = File('$path/$fileName');
await file.writeAsBytes(bytes, flush: true);
OpenFile.open('$path/$fileName');
}

Restrict PDF Permissions:

In Restrict PDF Permissions, you can customize the permissions to allow or restrict PDF documents. Like we can copy the content, edit the document, fill in the fields of the form it all lists the permission flags supported by this pdf library.

Include the following code to restrict the PDF document permissions.

PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('credit_card_statement.pdf'));
PdfSecurity security = document.security;
security.ownerPassword = 'owner@123';
security.permissions.addAll(<PdfPermissionsFlags>[
PdfPermissionsFlags.fullQualityPrint,
PdfPermissionsFlags.print,
PdfPermissionsFlags.fillFields,
PdfPermissionsFlags.copyContent
]);
//Save and dispose the document.
document.dispose();
_launchPdf(bytes, 'permissions.pdf');

Decrypt PDF:

Using flutter pdf library we can remove security from pdf documents password is required to decrypt pdf.

  • User password Removing from a PDF document: To remove open password in this we can do this by using the user password property available in the pdf security class.
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('secured.pdf'),
password: 'owner@123');
PdfSecurity security = document.security;
security.userPassword = '';
  • User password Removing from a PDF document: In this, we can extract the password by using PDFSecurity class with the help of ownerPassword property available in it as given in the below code reference.
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('secured.pdf'),
password: 'owner@123');
PdfSecurity security = document.security;
security.ownerPassword = '';

Code File :

import 'package:flutter/material.dart';

import 'package:flutter/services.dart';
import 'package:open_file/open_file.dart';
import 'package:path_provider/path_provider.dart';
import 'package:syncfusion_flutter_pdf/pdf.dart';
import 'dart:io';
class EncryptDecryptPdfDemo extends StatefulWidget {

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

class _EncryptDecryptPdfDemoState extends State<EncryptDecryptPdfDemo> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
//title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
onPressed:securePdf, child: Text('Encrypt PDF'),
),

// FlatButton(onPressed: securePdf, child: Text('Encrypt PDF')),
FlatButton(
onPressed: restrictPermissions,
child: Text('Restrict Permissions')),
FlatButton(onPressed: decryptPDF, child: Text('Decrypt PDF')),
]),
),
);
}

Future<void> securePdf() async {
//Load the existing PDF document.
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('credit_card_statement.pdf'));
//Set the document security.
document.security.userPassword = 'password@123';
//Save and dispose the document.
List<int> bytes = document.save();
document.dispose();
//Open the PDF file.
_launchPdf(bytes, 'secured.pdf');
}

Future<void> _launchPdf(List<int> bytes, String fileName) async {
//Get the external storage directory
Directory directory = await getExternalStorageDirectory();
//Get the directory path
String path = directory.path;
//Create an empty file to write the PDF data
File file = File('$path/$fileName');
//Write the PDF data
await file.writeAsBytes(bytes, flush: true);
//Open the PDF document in mobile
OpenFile.open('$path/$fileName');
}

Future<List<int>> _readDocumentData(String name) async {
final ByteData data = await rootBundle.load('assets/$name');
return data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
}

Future<void> restrictPermissions() async {
//Load the existing PDF document.
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('credit_card_statement.pdf'));
//Create document security.
PdfSecurity security = document.security;
//Set the owner password for the document.
security.ownerPassword = 'owner@123';
//Set various permission.
security.permissions.addAll(<PdfPermissionsFlags>[
PdfPermissionsFlags.fullQualityPrint,
PdfPermissionsFlags.print,
PdfPermissionsFlags.fillFields,
PdfPermissionsFlags.copyContent
]);
//Save and dispose the document.
List<int> bytes = document.save();
document.dispose();
//Open the PDF file.
_launchPdf(bytes, 'permissions.pdf');
}

Future<void> decryptPDF() async {
//Load the PDF document with permission password.
PdfDocument document = PdfDocument(
inputBytes: await _readDocumentData('secured.pdf'),
password: 'owner@123');
//Get the document security.
PdfSecurity security = document.security;
//Set owner and user passwords are empty string.
security.userPassword = '';
security.ownerPassword = '';
//Clear the security permissions.
security.permissions.clear();
//Save and dispose the document.
List<int> bytes = document.save();
document.dispose();
//Open the PDF file.
_launchPdf(bytes, 'unsecured.pdf');
}
}

Conclusion :

In this article, I have learned Encrypt and Decrypt PDF documents using the flutter pdf library in a Flutter application, which you can modify and experiment with according to your own, this little introduction was from the Encrypt and Decrypt PDF documents. In the Flutter demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Encrypt and Decrypt PDF documents in a flutter. In Flutter in your flutter project. We showed you what the Encrypt and Decrypt PDF documents In Flutter are? 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 Concentric Transition In Flutter

Flutter widget is built using a modern framework. It is like a react. In this, we start with the widget to create any application. Each component in the screen is a widget. The widget describes what his outlook should be given his present configuration and condition. Widget shows were similar to its idea and current setup and state.

Flutter automated testing empowers you to meet high responsiveness in your application as it helps in discovering bugs and various issues in your application. A Flutter is a tool for developing mobile, desktop, web applications with code & is a free and open-source tool.

In this article, we will explore the Explore Concentric Transition In Flutter using the flutter_concentric_transition_package. With the help of the package, we can easily achieve flutter concentric transition. So let’s get started.


Table Of Contents :

Concentric Transition

Implementation

Code Implement

Code File

Conclusion


Concentric Transition :

Concentric Transitions plugin is a very good plugin in a flutter. Users can use this plugin to create an animation type of onboarding screen and create custom animation screens like concentric page routers, custom clippers, etc. like we use Concentric PageRoute Then provides us animation type of page route which sends us from one screen to another.

Features:

  • Concentric PageView
  • Concentric Clipper
  • Concentric PageRoute

Implementation :

You need to implement it in your code respectively :

Step 1: Add dependencies.

Add dependencies to pubspec — yaml file.

dependencies:
concentric_transition: ^1.0.1+1

Step 2: import the package :

import 'package:concentric_transition/concentric_transition.dart';

Step 3: Run flutter package get

Code Implementation :

You need to implement it in your code respectively:

Before defining ConcentricPageView we will create a class in which we will define its title, image, color, etc as given in the below code reference.

class OnboardingData {
final String? title;
final Image? icon;
final Color bgColor;
final Color textColor;

OnboardingData({
this.title,
this.icon,
this.bgColor = Colors.white,
this.textColor = Colors.black,
});
}

After this, we will define the onboarding class data in a list that will display the data given to us on the screen. let’s understand it with its code reference below.

final List<OnboardingData> onBoardingData = [
OnboardingData(
icon:Image.asset('assets/images/melon.png'),
title: "Fresh Lemon\nfruits",
//textColor: Colors.white,
bgColor: Color(0xffCFFFCE),
),
OnboardingData(
icon:Image.asset('assets/images/orange.png'),
title: "Fresh Papaya\nfruits",
bgColor: Color(0xffFFE0E1),
),
OnboardingData(
icon:Image.asset('assets/images/papaya.png'),
title: "Fresh Papaya\nfruits",
bgColor: Color(0xffFCF1B5),
//textColor: Colors.white,
),
];

We will now use the ConcentricPageView widget inside the body in which color and duration of the animation. Using the column widget, we will show the image inside a box and display its title below the image. let’s understand it with its code reference below.

ConcentricPageView(
colors: colors,
radius: 30,
curve: Curves.ease,
duration: Duration(seconds: 2),
itemBuilder: (index, value) {
OnboardingData page = onBoardingData[index % onBoardingData.length];
return Container(
child: Theme(
data: ThemeData(
textTheme: TextTheme(
headline6: TextStyle(
color: page.textColor,
fontWeight: FontWeight.w600,
fontFamily: 'Helvetica',
letterSpacing: 0.0,
fontSize: 17,
),
subtitle2: TextStyle(
color: page.textColor,
fontWeight: FontWeight.w300,
fontSize: 18,
),
),
),
child: OnBoardingPage(onboardingDataPage: page),
),
);
},
),

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

Code File :

import 'dart:ui';
import 'package:concentric_transition/concentric_transition.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';

class ConcentricPageViewDemo extends StatelessWidget {
final List<OnboardingData> onBoardingData = [
OnboardingData(
icon:Image.asset('assets/images/melon.png'),
title: "Fresh Lemon\nfruits",
//textColor: Colors.white,
bgColor: Color(0xffCFFFCE),
),
OnboardingData(

icon:Image.asset('assets/images/orange.png'),
title: "Fresh Papaya\nfruits",
bgColor: Color(0xffFFE0E1),
),
OnboardingData(

icon:Image.asset('assets/images/papaya.png'),
title: "Fresh Papaya\nfruits",
bgColor: Color(0xffFCF1B5),
//textColor: Colors.white,
),
];

List<Color> get colors => onBoardingData.map((p) => p.bgColor).toList();

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: ConcentricPageView(
colors: colors,
radius: 30,
curve: Curves.ease,
duration: Duration(seconds: 2),
itemBuilder: (index, value) {
OnboardingData page = onBoardingData[index % onBoardingData.length];
return Container(
child: Theme(
data: ThemeData(
textTheme: TextTheme(
headline6: TextStyle(
color: page.textColor,
fontWeight: FontWeight.w600,
fontFamily: 'Helvetica',
letterSpacing: 0.0,
fontSize: 17,
),
subtitle2: TextStyle(
color: page.textColor,
fontWeight: FontWeight.w300,
fontSize: 18,
),
),
),
child: OnBoardingPage(onboardingDataPage: page),
),
);
},
),
),
);
}
}

class OnBoardingPage extends StatelessWidget {
final OnboardingData onboardingDataPage;

const OnBoardingPage({
Key? key,
required this.onboardingDataPage,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(
horizontal: 30.0,
),
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_buildPicture(context),
SizedBox(height: 30),
_buildText(context),
],
),
);
}

Widget _buildText(BuildContext context) {
return Text(
onboardingDataPage.title!,
style: Theme.of(context).textTheme.headline6,
textAlign: TextAlign.center,
);
}

Widget _buildPicture(
BuildContext context, {
double size = 190,
double iconSize = 170,
}) {
return Container(
width: size,
height: size,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(60.0)),
color: onboardingDataPage.bgColor
// .withBlue(page.bgColor.blue - 40)
.withGreen(onboardingDataPage.bgColor.green + 20)
.withRed(onboardingDataPage.bgColor.red - 100)
.withAlpha(90),
),
padding:EdgeInsets.all(15),
margin: EdgeInsets.only(
top: 140,
),
child:onboardingDataPage.icon,
);
}
}

class OnboardingData {
final String? title;
final Image? icon;
final Color bgColor;
final Color textColor;

OnboardingData({
this.title,
this.icon,
this.bgColor = Colors.white,
this.textColor = Colors.black,
});
}

Conclusion:

In this article, I have explained Explore Concentric Transition In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Explore Concentric Transition In Flutter demo from our side.

I hope this blog will provide you with sufficient information on Trying up the Explore Concentric Transition In Flutter in your flutter project. We showed you what the Explore Concentric Transition In Flutter 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 Onboarding Overlay 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, there will be some problems or bugs in the code that 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 Explore Onboarding Overlay In Flutter. We will also implement an Explore Onboarding Overlay Widget demo and use them in your flutter applications. So let’s get started.


Table of Contents :

Flutter

Explore Onboarding Overlay

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 It means that you can use one programming language and one codebase to create two different apps (for iOS and Android).”.

Onboarding Overlay :

The Onboarding Overlay Package animated implements onboarding overlay following custom design guidelines, in this, we can use any widget within onboarding overlay, we use it to introduce the user to a feature about which they wouldn’t you know. Onboarding overlay is a flexible onboarding widget that can start and stop with an arbitrary number of steps and arbitrary starting points.

Implementation :

You need to implement it in your code respectively :

Step 1: Add dependencies.

Add dependencies to pubspec — yaml file.

dependencies:
onboarding_overlay: ^2.1.0

Step 2: import the package :

import 'package:onboarding_overlay/onboarding_overlay.dart';

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

Code Implementation :

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

First of all, we have to define our GlobalKey and inside it, whose name is onBoardingKey and scaffoldKey.

final GlobalKey<OnboardingState> onboardingKey = GlobalKey<OnboardingState>();final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();

Now we will use the Onboarding Widget inside which we will use Steps property inside which we have used some different types of properties like its title, titleTextColor, labelBoxPadding, labelBoxDecoration, bodyText, etc. which we have used a code below can be understood with the help of reference.

OnboardingStep(
focusNode: focusNodes[0],
title: 'Tap anywhere to continue Tap anywhere to continue',
titleTextColor: Colors.black,
bodyText: 'Tap anywhere to continue Tap anywhere to continue',
labelBoxPadding: const EdgeInsets.all(16.0),
labelBoxDecoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: const Color(0xFF00E1FF),
border: Border.all(
color: const Color(0xFF1E05FB),
width: 1.0,
style: BorderStyle.solid,
)),
arrowPosition: ArrowPosition.bottomCenter,
hasArrow: true,
hasLabelBox: true,
fullscreen: true,
),

Code File :

import 'package:flutter/material.dart';
import 'package:onboarding_overlay/onboarding_overlay.dart';class OnBoardingOverlayDemo extends StatefulWidget {
const OnBoardingOverlayDemo({
Key? key,
required this.focusNodes,
}) : super(key: key);

final List<FocusNode> focusNodes;

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

class _OnBoardingOverlayDemoState extends State<OnBoardingOverlayDemo> {
late int _counter;

@override
void initState() {
super.initState();
_counter = 0;
}

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

void _increment(BuildContext context) {
setState(() {
_counter++;
Onboarding.of(context)!.show();
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
focusNode: widget.focusNodes[4],
icon: const Icon(Icons.menu),
onPressed: () {},
),
title: Focus(
focusNode: widget.focusNodes[3],
child: const Text('Title'),
),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Focus(
focusNode: widget.focusNodes[0],
child: const Text('You have pushed the button this many times:'),
),
Focus(
focusNode: widget.focusNodes[2],
child: Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
),
],
),
),
floatingActionButton: FloatingActionButton(
focusNode: widget.focusNodes[1],
onPressed: () {
_increment(context);
},
child: const Icon(Icons.add),
),
);
}
}

Conclusion :

In this article, I have explained Explore Onboarding Overlay In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Explore Onboarding Overlay In Flutter demo from our side.

I hope this blog will provide you with sufficient information on Trying up the Explore Onboarding Overlay In Flutter in your flutter project. We showed you what the Explore Onboarding Overlay In Flutter 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.

Flutter With GSheets

0

Google Sheet is an online web spreadsheet application made by Google. Google Sheet permits shared altering continuously. Everything clients can see every one of the progressions made by different users. Google Sheets additionally support disconnected altering. It additionally upholds different document arrangements and record types eg. .xlsx, .xls, .xlt, and so on Google Sheets can likewise be integrated with other Google items.

In this article, we will explore the Flutter With GSheets. We will see how to implement a demo program to create a sample app that stores user data from the Flutter app into Google Sheets in your flutter applications.


Table Of Contents ::

Introduction

Setting up Google Sheets

Setting up Google Cloud Console

Setting up Project

Conclusion

GitHub Link


Introduction:

Hello everyone, This is my first ever article on Flutter. Google Sheets is a very powerful package if we look deep into it. It provides us with an interface using the GSheets package so that we can do various types of operations on Google Spreadsheet. We can perform all types of operations like Reading/Inserting/Updating/Deleting using the GSheets package on Google Sheets. It’s so much powerful and capable than we can even use Google Sheets as a back-end of our application. Here we’ll develop a sample flutter application So, let’s start.

Setting up Google Sheets:

  • Sign in with your Google Account.
  • Go to your Google Drive and create a new Google Sheets document where you want to store your responses and Open that.
  • Setup header columns of sheet and you’ll see like this.

As above, I’ve set up header columns of the sheet. You can see I’ve highlighted part of the URL. It is the Sheet ID of our current document. Just copy it, we’ll require it in the next step. Every document has a unique Sheet ID.

Setting up Google Cloud Console:

  • Please go to the google cloud console.
  • As in the below Image, Just click on the new project
  • After creating a new project please select that project for further configuration.
  • Then click on create a service account and choose the project for service account configuration.
  • Fill the all required fields and click on the Done button.
  • Go to the key section as shown in bellow image
  • Click on ADD KEY Dropdown menu and choose to Create New Key.
  • Then select the JSON option and Click on CREATE for generating Credentials.
  • The Credentials are automatically Downloading when you click on CREATE button

Setting up Project :

1.Package Used:

gsheets | Dart Package
A library for working with Google Sheets API v4. Manage your spreadsheets with gsheets in Dart. Basic usage sees…pub.dev

pubspec.yaml:

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
gsheets 0.3.1

2.Create Methods

  • Define Credential detail.
const _credentials = r''' The data of JSON file Downloaded when setting up google Cloud console paste here''';
//spredsheet id
const _spreadsheetId = 'Type your spredsheet id here';
  • Create _loadCredential method for load credential details.
_loadCredential() async {
gsheets = GSheets(_credentials);
ss = await gsheets.spreadsheet(_spreadsheetId);
sheet = ss.worksheetByTitle('dump');
print('Google Sheet Successfully Load');
_tableHeader();
}
  • The _tableHeader() method sets the Column name of GSheets.
_tableHeader() async {
await sheet!.values.insertValue('S no', column: 1, row: 1);
await sheet!.values.insertValue('User ID', column: 2, row: 1);
await sheet!.values.insertValue('Album ID', column: 3, row: 1);
await sheet!.values.insertValue('Album title', column: 4, row: 1);
await sheet!.values.insertValue('Year', column: 5, row: 1);
}
  • Call the _loadCredential() method in initState().
@override
void initState() {
_loadCredential();

super.initState();
}
  • Upload the data on GSheet when the user pressed the button.
_uploadData() async { await sheet.values.insertValue(_counter, column: 1, row: rowCount);
await sheet.values.insertValue('nvkdk234', column: 2, row: rowCount);
await sheet.values.insertValue('Alb43', column: 3, row: rowCount);
await sheet.values.insertValue('wedding', column: 4, row: rowCount);
await sheet.values.insertValue('2021', column: 5, row: rowCount);}
  • Call the _uploadData() method on the button pressed.

Conclusion:

In the article, I have explained how you can integrate google sheet with your flutter app. You can use the package according to your requirement. This was a small introduction to how you create a service account on the google cloud console and use that credentials to post the data on google sheets and use it in our app.

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


GitHub Link:

find the source code of the Flutter GSheets :

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


From Our Parent Company Aeologic

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

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

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

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

0

The flutter widget is built using a modern framework. It is like a reaction. In this, we start with the widget to create any application. Each component in the screen is a widget. The widget describes what his outlook should be given his present configuration and condition. Keeping your widgets from having direct dependencies makes your code better organized and easier to test and maintain. But now you need a way to access these objects from your UI code. When I came to Flutter from the. Widget shows were similar to its idea and current setup and state. Flutter is a free and open-source tool to develop mobile, desktop, web applications with a single code base.

In this article, we will explain what is GetIt in flutter using the flutter_get_it_package. With the help of the package, and how to use them in your flutter applications. So let’s get started.


Table Of Contents :

GetIt

Implementation

Code Implement

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”

GetIt :

GetIt package is a kind of this simple service locator in which some you will have a central registry whereby registering the class then we can get an instance of that class we use it instead of inherited widget or provider we use to access the object Is. from your UI.

Service Locator, dependency injection Both are forms of inversion of control (IOC). An IOC allows requests from anywhere from registering its class type to accessing it to the container.

Implementation:

Step 1: Add the dependencies

Add dependencies to pubspec — yaml file.

dependencies :dependencies:
get_it: ^7.2.0

Step 2: Importing

import 'package:get_it/get_it.dart';

Step 3: Enable AndriodX

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Code Implementation:

Before explaining about GetIt we will make a method of GitIt to use in our code as given in reference below.

This is our service locator.

GetIt getIt = GetIt.instance;

Next, we have created an abstract class named GetItAppModel which extends ChangeNotifier.

abstract class GetItAppModel extends ChangeNotifier {
void incrementCounter();
int get counter;
}

Now we have created a class named GetItAppModelImplementation which we have extends from GetItAppModel class inside it we have created the incrementCounter() method which increments the counter value.

class GetItAppModelImplementation extends GetItAppModel {

int _counter = 0;

GetItAppModelImplementation() {
Future.delayed(Duration(seconds: 3)).then((_) => getIt.signalReady(this));
}

@override
int get counter => _counter;

@override
void incrementCounter() {
_counter++;
notifyListeners();
}
}

After this, we will create a counter app in which we have taken column widget inside the body inside which we have taken two text widget and outside one is floatingActionButton which on click will call GetItAppModel() class and in the counter app, the value will be incremented above column widget Wrapped with FutureBuilder above and getIt.allReady(), defined in future Properties.

FutureBuilder(
future: getIt.allReady(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return Scaffold(

body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
getIt<GetItAppModel>().counter.toString(),
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: getIt<GetItAppModel>().incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
} else {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Text('Initialisation'),
SizedBox(
height: 16,
),
CircularProgressIndicator(),
],
);
}
})

Code File :

import 'package:flutter/material.dart';
import 'package:flutter_getit_exm/app_model.dart';
import 'package:flutter_getit_exm/main.dart';
class GetItExm extends StatefulWidget {
GetItExm({Key? key, required this.title}) : super(key: key);

final String title;

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

class _GetItExmState extends State<GetItExm> {
@override
void initState() {
getIt
.isReady<GetItAppModel>()
.then((_) => getIt<GetItAppModel>().addListener(update));
super.initState();
}
@override
void dispose() {
getIt<GetItAppModel>().removeListener(update);
super.dispose();
}

void update() => setState(() => {});

@override
Widget build(BuildContext context) {
return Material(
child: FutureBuilder(
future: getIt.allReady(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
getIt<GetItAppModel>().counter.toString(),
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: getIt<GetItAppModel>().incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
} else {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Text('Waiting for initialisation'),
SizedBox(
height: 16,
),
CircularProgressIndicator(),
],
);
}
}),
);
}
}

Conclusion :

In this article, I have explained Explore GetIt In Flutter, which you can modify and experiment with according to your own, this little introduction was from the Explore GetIt In Flutter demo from our side.

I hope this blog will provide you with sufficient information in Trying up the Explore GetIt In Flutter in your flutter project. We showed you what the Explore GetIt In Flutter 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.