dscript_dart 1.2.0
dscript_dart: ^1.2.0 copied to clipboard
Scripting language for flutter/dart plugins & extensions
Dscript #
A lightweight Domain-Specific Language (DSL) for Dart designed to simplify writing and integrating plugins/extensions into Flutter and Dart applications. It offers strong interop between DSL constructs and Dart code, a static permission system, and a contract-based plugin model.
Getting Started #
Define a script:
author "You";
version 0.1.0;
name "Example";
description "demo";
contract Demo {
impl greet(string who) -> void {
log::info("Hello " + who);
}
}
Register the contract in your host app:
final demo = contract('Demo')
.impl('greet', returnType: PrimitiveType.VOID)
.param('who', PrimitiveType.STRING)
.describe("Greets someone")
.end()
.build();
For full documentation see the docs.
Contributing #
Please read CONTRIBUTING.md for development instructions.
License #
This project is licensed under the MIT License.