patch_pal 0.0.2 copy "patch_pal: ^0.0.2" to clipboard
patch_pal: ^0.0.2 copied to clipboard

Flutter package thats helps you to patch your widget/code with json data.

PatchPal #

Flutter CI [codecov.io] (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.

  1. add dependency

    dependencies:
      patch_pal: ^0.0.2 #latest
    

    or

    patch_pal:
    git:
      url: https://github.com/yeasin50/patch_pal.git
      ref: master
    
  2. import the package

     import 'package:patch_pal/patch_pal.dart';
    
  3. initialize config path

    /// You need to setup the path, you can use [FutureBuilder]
    /// (yourJsonConfigFilePath) should return a json
    PatchPal.setUp(yourJsonConfigFilePath);
    
  4. 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

TODO #

  • ❌ Config(Json) generator
  • ❌ version based features
  • ✅ alert widgets and views
  • ❌ stream or ValueLister
4
likes
160
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter package thats helps you to patch your widget/code with json data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http, mockito

More

Packages that depend on patch_pal