A toggle dev tool allows you to store, update, and consume boolean configuration values.
🤖 Android | 🍏 iOS |
---|---|
![]() |
Not ready yet. |
Name | Type | Default | Optional | Description |
---|---|---|---|---|
title | string |
"" |
➕ | A tool title that will be displayed inside the configuration screen. |
description | string |
"" |
➕ | A short description explaining what the configuration value is doing and what changes might bring its update. |
canBeDisabled | boolean |
false |
➕ | Will add a checkbox to the tool, which will allow disabling it. |
defaultEnabledValue | boolean |
true |
➕ | The tool will be enabled by default if true and disabled vice-versa. |
isCritical | boolean |
false |
➕ | The tool which will have it set to true will trigger critical updates. |
default | boolean |
false |
➕ | The default boolean configuration value. |
Below is an example of a toggle tool configuration in YML format. Note that you should use the !toggle
type.
toggle-tool: !toggle {
title: "Toggle tool",
description: "A boolean configuration value tool",
canBeDisabled: true,
defaultEnabledValue: false,
isCritical: true,
default: true
}
Below is an example of a toggle tool configuration in JSON Schema format. Note that you should add the "type": "boolean"
to the configuration object to make it map to a toggle tool.
"toggle-tool": {
"type": "boolean",
"title": "Toggle tool",
"description": "A boolean configuration value tool",
"canBeDisabled": true,
"defaultEnabledValue": false,
"isCritical": true,
"default": true
}
TBA
val tool = ToggleTool(default = false)
tool = title = "Toggle tool"
tool = description = "A boolean configuration value dev tool"
tool = canBeDisabled = true
tool = defaultEnabledValue = false
tool = isCritical = true