devi

Creator: coderz1093

Last updated:

0 purchases

devi Image
devi Images

Languages

Categories

Add to Cart

Description:

devi

A flutter framework for storage, navigator, validate manager, we made flutter easy and fast.



Table of content #

About Devi
Object creating
Route Management
Disk Storage

Write a storage
Read a storage
Checking a storage
Remove a storage
Get all storage as JSON
Clear all varibale


Snackbar and Alert

SnackBar or Toast
Dialogbox or Alert


Copy to clipboard
Validator

About Devi #
Devi is a fast and light framework for flutter to make work easy, its make management fast. Devi has very easy code and clean code to understand for beginner and all. Its allow to management for route, disk storage, alerts and validation.
Object creating #
Before using user have to intilize object for class DEVI.
Devi devi = new Devi();
copied to clipboard
When want to use disk storage.
Devi box1 = new Devi('box1');
Devi box2 = new Devi('box2');
copied to clipboard
Route Management #
If you want to navigate to another screen, so here we use the route management to jump to another screen.
devi.route(context,MyApp());
copied to clipboard
It will create route to screen MyApp.
For going back from current screen to previous screen, here we use back() method
devi.back();
copied to clipboard
It will route to you previous screen.
Disk Storage #
Disk storage is use to create disk variable as cache in your application. which is permanently created in system till formating device. Its very light to use and based on JSON.
Write a storage #
To write or creating new storage variable here we use method put()
Devi devi = new Devi('box1'); //box1 is parent storage name

devi.put('name','Rohit');
copied to clipboard
It will write Rohit as key name in box1, and store to the disk.
Read a storage #
For reading a existing disk storage we use get() method
devi.get('name');
copied to clipboard
It will return value of key name.
Checking a storage #
For checking is variable is available or not in disk.
devi.isHas('name'); //will return true or false
copied to clipboard
Another example
if(devi.isHas('name') == true){
print('Yes, key is found');
} else {
print('No, key not found');
}
copied to clipboard
Remove a storage #
For clear specific key from storage we use remove() method
devi.remove('name');
copied to clipboard
It will remove name key from storage.
Get all storage as JSON #
For getting all stored value from box, here we use getJson() method
Devi devi = new Devi('box1');
devi.put('name','Rohit');
devi.put('county','India');

devi.getJson();
copied to clipboard
will return
{
"name":"Rohit",
"country":"India"
}
copied to clipboard
Clear all varibale #
For clearing all disk variable here we use clean method.
devi.clean();
copied to clipboard
Snackbar and Alert #
Snackbar and alert is use to create a pop information in application.
SnackBar or Toast #
for creating snackbar on application here we have method toast()
devi.toast(context,
title: "Hello, I am SnackBar",
buttonLabel: "Ok",
onPressed: () {
print("SnackBar Clicked!");
});
copied to clipboard
for applying theme on snackbar we use theme properties
devi.toast(context,
theme: Colors.red, //background color
buttonTheme: Colors.white, //button color
title: "Hello, I am SnackBar",
buttonLabel: "Ok",
onPressed: () {
print("SnackBar Clicked!");
});
copied to clipboard
Dialogbox or Alert #
To show pop up dialogbox here we use alert() method
devi.alert(context,
title: "Heading",
description: "This is Alert Box",
actions: [
TextButton(onPressed: () => Navigator.of(context).pop(), child: Text("Ok"))
]);
copied to clipboard
Copy to clipboard #
When you want to copy and text in clipboard here we use copy() method
String text = "Hello, I am devi!";
devi.copy(text);
devi.paste(); // will return copied txt
copied to clipboard
It will copy text to your system clipboard.
Validator #
There is some string validator to validate email, strong password etc.
String email = "[email protected]";
if(devi.isEmail(email) == true){
print("Email is valid");
} else {
print("Email is not valid");
}

String password = "Qwerty@123";
if(devi.isPassword(password) == true){
print("Password is strong");
} else {
print("Password is weak");
}


String website = "http://google.com";
if(devi.isUrl(website) == true){
print("URL is strong");
} else {
print("URL is weak");
}
copied to clipboard
Example #
👉 For a complete example, refer to the Devi package documentation.
Report bugs or issues #
You are welcome to open a ticket on github if any 🐞 problems arise. New ideas are always welcome.

Copyright © 2024 Rohit Chouhan. Licensed under the MIT LICENSE

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.