https://github.com/nitrictech/dart-sdk
Dart integration for Nitric.
https://github.com/nitrictech/dart-sdk
cloud dart dart-package nitric serverless
Last synced: 12 months ago
JSON representation
Dart integration for Nitric.
- Host: GitHub
- URL: https://github.com/nitrictech/dart-sdk
- Owner: nitrictech
- License: apache-2.0
- Created: 2024-01-05T02:36:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T01:17:35.000Z (12 months ago)
- Last Synced: 2025-04-12T15:03:43.983Z (12 months ago)
- Topics: cloud, dart, dart-package, nitric, serverless
- Language: Dart
- Homepage: https://nitric.io
- Size: 501 KB
- Stars: 8
- Watchers: 3
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Build Nitric applications with Dart
The Dart SDK supports the use of the Nitric framework with Dart and Flutter. For more information, check out the main [Nitric repo](https://github.com/nitrictech/nitric).
Nitric SDKs provide an infrastructure-as-code style that lets you define resources in code. You can also write the functions that support the logic behind APIs, subscribers and schedules.
You can request the type of access you need to resources such as publishing for topics, without dealing directly with IAM or policy documents.
## Usage
### Starting a new project
Install the [Nitric CLI](https://nitric.io/docs/getting-started/installation), then generate your project:
```bash
nitric new hello-world dart-starter
```
### Add to an existing project
First of all, you need to install the library:
```yaml
dart pub add nitric_sdk
```
Then you're able to import the library and create cloud resources:
```dart
import 'package:nitric_sdk/nitric.dart';
void main() {
final publicApi = Nitric.api("public");
final uploads = Nitric.bucket("uploads").allow([
BucketPermission.write,
]);
publicApi.get("/upload", (ctx) async {
final photo = uploads.file("images/photo.png");
final url = await photo.getUploadUrl(600);
ctx.res.json({"url": url});
return ctx;
});
}
```
## Status
The SDK is in early stage development and APIs and interfaces are still subject to breaking changes. We’d love your feedback as we build additional functionality!
- Reference Documentation: https://nitric.io/docs/reference/dart
- Guides: https://nitric.io/docs/guides/dart
## Learn more
Learn more by checking out the [Nitric documentation](https://nitric.io/docs).
## Get in touch:
- Join us on [Discord](https://nitric.io/chat)
- Ask questions in [GitHub discussions](https://github.com/nitrictech/nitric/discussions)
- Find us on [Twitter](https://twitter.com/nitric_io)
- Send us an [email](mailto:maintainers@nitric.io)