0 purchases
dishhq
DishHQ for flutter #
Dish makes shipping software productive by managing all the hassle of building, shipping and managing software so your team can focus on the core product and forget the hassle.
This package is a wrapper for the official DishHQ Rest API
Learn more here
Install #
Add this line to your pubspec.yaml:
dependencies:
dishhq: ^0.0.3
copied to clipboard
Then run this command:
$ flutter packages get
copied to clipboard
Then add this import:
import 'package:dishhq/dishhq.dart';
copied to clipboard
Supported Platforms #
Android
iOS
macOS
Web
Linux (Untested)
Windows (Untested)
🟡 Do not forget to enable internet permissions in the respective platforms
🟡 This package does not support null safety yet. Planning to add this in an upcoming update
Usage (KVDatabase) #
//Import dish
import 'package:dishhq/dishhq.dart';
// Inside Stateful Widget, Initialize Dish KVDatabase Instance
var db = Dish.database(apiKey: '<YOUR_API_KEY>');
//Use the provided methods in your code
Map res = await db.create(
key: 'yourkey',
value: 'yourvalue',
); //Create Method
Map res = await db.update(
key: 'yourkey',
value: 'yourvalue',
); //Update Method
Map res = await db.read(key:'yourkey'); //Read Method
Map res = await db.delete(key: 'yourkey'); //Delete Method
/*
Each of these functions is a future that once resolved, returns a Map that looks like:
{
"success": bool, (if false => An API Error has definitely occured)
"message": String? (Usually contains the specific error message) | nullable
"value": String? (Contains the returned value Read Reqeusts) | nullable
}
NOTE: If value is null in a read request then check the message property of the response to check for errors
*/
copied to clipboard
Test out the Flutter Web Demo #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.