Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'dart:js' as js;
- // Tool-specific configuration settings
- // Create a const variable for each configuration entry in the tool.
- // The name provided to each jsContextBridge should match the XML tag name that will be expected by the engine plugin.
- // The names here should also match the names in index.html.
- const Server = jsContextBridge('Server');
- const Username = jsContextBridge('Username');
- const Password = jsContextBridge('Password');
- const Site = jsContextBridge('Site');
- const Project = jsContextBridge('Project');
- const UploadFile = jsContextBridge('UploadFile');
- // Needed for all tools
- class jsContextBridge {
- const jsContextBridge(this.ayxConfigKey);
- final String ayxConfigKey;
- String Get(){
- String value = js.context["Alteryx"]["Gui"]["Manager"].callMethod('getDataItem', [ayxConfigKey]).callMethod('getValue');
- return value == null ? "null" : value;
- }
- void Set(String value){
- js.context["Alteryx"]["Gui"]["Manager"].callMethod('getDataItem', [ayxConfigKey]).callMethod('setValue', [value]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement