0 purchases
walf
Walf - Secure Database #
Walf is a secure and fast key-value based database based on JSON. It uses AES-256 CBC encryption algorithm for Walf security. Keeps all data in a customized JSON file with ".wfdb" extension in the device.
Features #
🚀 Cross platform: Android, IOS
❤️ Simple, powerful, & intuitive API
🔒 Strong encryption built in
🎈 NO native dependencies
Setup #
The permission_handler package required.
/pubspec.yaml file:
Add dependencies permission_handler because Walf create locale database on device.
dependencies:
flutter:
sdk: flutter
permission_handler: ^7.1.0
walf: ^1.0.0
copied to clipboard
Usage #
You must initialize your database:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
if (await Permission.storage.isDenied) {
Permission.storage.request();
}
initWalfDatabase();
runApp(MyApp());
}
String databaseName = "beratdatabase";
late WalfDatabase database;
initWalfDatabase() async {
database = WalfDatabase(databaseName);
if (!(await database.existDatabase(databaseName))) {
database.createDatabase(databaseName);
} else {
database.initDatabase();
}}
copied to clipboard
Walf Database Plugin example usage code:
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Walf Example App'),
),
body: Center(
child: Column(
children: [
StreamBuilder<WalfString>(
stream: database.getString("key").asStream(),
builder: (context, snapshot) {
return Column(
children: [
Text(snapshot.data!.value.toString()),
TextButton(
onPressed: () {
database.setString("key", "Mustafa Berat Kurt");
setState(() {});
},
child: Text("INCREASE")),
TextButton(
onPressed: () {
database.removeData("key");
setState(() {});
},
child: Text("REMOVE")),
],
);
}),
],
),),
),);
copied to clipboard
Plugin Author #
Berat Kurt💻 🎨
LICENCE #
MIT License
Copyright (c) 2021 Berat Kurt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.