Skip to content

Commit

Permalink
fixing flutter dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
anidotnet committed Jan 11, 2024
1 parent 233847c commit 6ed1c36
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 38 deletions.
27 changes: 10 additions & 17 deletions flutter-sdk/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,27 @@ order: 20

Nitrite is a pure Dart database. It does not depend on any native library. So it can be used in any platform where Dart is supported. It is a server-less embedded database ideal for desktop, mobile, or web applications. It is written in pure Dart and runs in Flutter, Dart VM, and the browser.

To get started with Nitrite database, you need to add the dependency to your pubspec.yaml file.

## Add dependency

Add Nitrite dependency to your project:
To use Nitrite in you project, add the following package to your package:

```yaml
dependencies:
nitrite: ^[latest version]
```bash
dart pub add nitrite
```

The latest released version of Nitrite can be found [here](https://pub.dev/packages/nitrite).
To add the nitrite code generator to your project, add the following to your `pubspec.yaml` file:
To add the nitrite code generator to your project:

```yaml
dev_dependencies:
build_runner: ^2.4.6
nitrite_generator: ^[latest version]
```bash
dart pub add --dev build_runner
dart pub add --dev nitrite_generator
```

More details about the code generator can be found [here](repository/codegen.md).

To add the hive adapter to your project, add the following to your `pubspec.yaml` file:
To use the hive storage adapter to your project add the below package:

```yaml
dependencies:
nitrite_hive_adapter: ^[latest version]
```bash
dart pub add nitrite_hive_adapter
```

More details about the hive adapter can be found [here](modules/store-modules/hive.md).
Expand Down
2 changes: 1 addition & 1 deletion flutter-sdk/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 10
A migration is a set of changes to the schema that can be applied to a database. Migrations are used to keep the database schema up to date with the codebase. It contains a queue of instructions that are executed in order to update the database schema from one version to the next.

!!!primary
The migration is executed only once for a specific schema version. If you want to execute the migration again, you need to change the schema version of the database.
The migration is executed only once for a specific schema version.ni If you want to execute the migration again, you need to change the schema version of the database.
!!!

For example, if you have a database with the schema version 1 and you want to update it to version 2, you need to apply the migration steps from version 1 and version 2.
Expand Down
9 changes: 4 additions & 5 deletions flutter-sdk/modules/spatial.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Nitrite Spatial module provides support for spatial queries. The module uses [JT

## Adding Spatial Module

To add Spatial module to your project, you need to add below dependency to your `pubspec.yaml` file:
To use Spatial module to your project, you need to add below dependency to your project:

```yaml
dependencies:
nitrite: ^[latest-version]
nitrite_spatial: ^[latest-version]
```bash
dart pub add nitrite
dart pub add nitrite_spatial
```

## Using Spatial Module
Expand Down
9 changes: 4 additions & 5 deletions flutter-sdk/modules/store-modules/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Nitrite provides a persistent storage module based on [Hive](https://github.com/

## Adding Hive Module

To use Hive module, you need add below dependency to your `pubspec.yaml` file:
To use Hive module, you need add below dependency to your project:

```yaml
dependencies:
nitrite: ^[latest-version]
nitrite_hive_adapter: ^[latest-version]
```bash
dart pub add nitrite
dart pub add nitrite_hive_adapter
```

## Using Hive Module
Expand Down
9 changes: 4 additions & 5 deletions flutter-sdk/repository/codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ Both of these generators are available in the `nitrite_generator` package.

## Setup

Add the following to your `pubspec.yaml`:
Add the following package as your dev dependency:

```yaml
dev_dependencies:
nitrite_generator: ^[latest version]
build_runner: ^2.4.7
```bash
dart pub add --dev build_runner
dart pub add --dev nitrite_generator
```

Once you have added the annotations to your code, you can run the generator using the `build_runner` command-line tool:
Expand Down
9 changes: 4 additions & 5 deletions flutter-sdk/support/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ Nitrite provides some additional functionalities via `nitrite-support` library.

## Adding nitrite-support

To add `nitrite-support` to your project, add the following dependency to your `pubspec.yaml` file:
To use `nitrite-support` to your project, add the following dependency to your project:

```yaml
dependencies:
nitrite: ^[latest-version]
nitrite_support: ^[latest-version]
```bash
dart pub add nitrite
dart pub add nitrite_support
```

0 comments on commit 6ed1c36

Please sign in to comment.