# dart-services

> > This is a ts wrapper for aclling dartservies api, which remotely compiles dart code to js - executable for flutter

Latest version **0.2.7** (published 2023-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install dart-services
pnpm add dart-services
yarn add dart-services
bun add dart-services
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.7 |
| Published | 2023-02-10 |
| First published | 2020-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 64 |
| Author | Grida Inc. |
| Maintainers | softmarshmallow |

## Links

- npm: https://www.npmjs.com/package/dart-services
- Repository: https://github.com/gridaco/flutter/tree/main/packages/dartservices
- npm.io page: https://npm.io/package/dart-services

## Recent versions

- 0.2.7 (latest) — 2023-02-10
- 0.2.6 — 2023-02-09
- 0.2.5 — 2022-07-26
- 0.2.4 — 2022-07-26
- 0.2.3 — 2021-01-07
- 0.2.2 — 2020-11-10
- 0.2.1 — 2020-11-08
- 0.2.0 — 2020-11-03
- 0.1.10 — 2020-10-30
- 0.1.9 — 2020-10-30
- 0.1.8 — 2020-10-30
- 0.1.7 — 2020-10-29
- 0.1.6 — 2020-10-29
- 0.1.5 — 2020-10-29
- 0.1.4 — 2020-10-29
- … 4 more at https://npm.io/package/dart-services/versions

## README

# dart service api wrapper

> This is a ts wrapper for aclling dartservies api, which remotely compiles dart code to js - executable for flutter

Install

```
yarn add dart-services
```

```ts
// default usage
import DartServices from "dart-services";
const service = DartServices.create();

// or with custom channel
const beta = DartServices.create({
  channel: "beta",
});

// or with custom backend
const myserver = DartServices.create({
  baseUrl: "http://localhost:8080",
});

// using dedicated channels
import { stable } from "dart-services";
import { beta } from "dart-services";

// compile apis
const maindartsrc = "...";
// compile ddc
service.compileDDC(maindartsrc);
// compile
service.compile(maindartsrc);
// compile complete
service.compileComplete(maindartsrc);
// analyze
service.analyze(maindartsrc);

// or simply use this simple function.
import { compileComplete } from "dart-services";
compileComplete(maindartsrc);
```

## Difference between compileDDC and compileComplete

see - https://github.com/dart-lang/dart-pad/blob/master/lib/services/execution_iframe.dart

The iframe source, https://dartpad.dev/scripts/frame_dark.html requires compiled js with compiledDDC and it needs to be transformed statically following the `execution_iframe.dart`'s logic.

## References

- [dart-pad](https://github.com/dart-lang/dart-pad)
- [dart-services](https://github.com/dart-lang/dart-services)

---
_Source: https://npm.io/package/dart-services · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
