patch_pal 0.0.2
patch_pal: ^0.0.2 copied to clipboard
Flutter package thats helps you to patch your widget/code with json data.
PatchPal #
[
]
(https://codecov.io/github/yeasin50/patch_pal?branch=master)
patch_pal package help to enable/disable feature of app from json file. use raw git path like this
Getting started #
The Json structure will be like
{
"packageName": "com.yeasin50.patch_pal",
"version": "1.0.0",
"items": [
{
"name": "number of mango",
"value": 3,
"message": "added 3 mangos"
},
{
"name": "rain",
"value": true,
"message": "enabled rain based on weather"
}
],
"updates": ["looking for updates..."]
}
Usage #
Include short and useful examples for package users. Add longer examples
to /example folder.
-
add dependency
dependencies: patch_pal: ^0.0.2 #latestor
patch_pal: git: url: https://github.com/yeasin50/patch_pal.git ref: master -
import the package
import 'package:patch_pal/patch_pal.dart'; -
initialize config path
/// You need to setup the path, you can use [FutureBuilder] /// (yourJsonConfigFilePath) should return a json PatchPal.setUp(yourJsonConfigFilePath); -
Then you can get value using PatchItemName
- To show dialog use
PatchPal.dialog - Replace [child] with patcher view use
PatchPal.view. - To show overlay/stack use
PatchPal.overlay - To switch between widget based on value use
PatchPal.switcher
- To show dialog use
TODO #
- ❌ Config(Json) generator
- ❌ version based features
- ✅ alert widgets and views
- ❌ stream or ValueLister