thikdb

Creator: coderz1093

Last updated:

0 purchases

thikdb Image
thikdb Images

Languages

Categories

Add to Cart

Description:

thikdb

Hive implementation for easy create simple config for app.
Features #

Quick implement config (ex: for app) with data save to Hive db

Getting started #
Create class that extend ThikDb then call open()
For example:
class AppConfig extends ThikDb {
static const String dbDir = "db"; //create 'db' directory under app directory
static late final AppConfig _; //static instance to quick access
AppConfig() :super("app_config"); //db table name

static Future<void> init() async {
_ = AppConfig();
String dbFullPath = (await _.open(dbDirName: dbDir))!;
dbPath = dbFullPath;
}
}
copied to clipboard
Usage #
Create some static variable that you will directly access.
Longer examples is in /example folder.
static String get testStringVar => _.get("testStringVar", ""); //key - default value
static set testStringVar(String value) => _.put("testStringVar", value); //key - value
copied to clipboard
call listAppDirectory() to get simple app folder for some goal, ex: for save big file
Additional information #
Either create issue on Github or email me if you found something or want more info

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.